---
agentTools:
  projectIndex: https://financial-cloud.readme.io/llms.txt
---

# Challenge 3DSv2 Card

POST request for completing the challenge flow for a 3DSv2 Card - Payment Plans and Arrangements.
Whether Payment Plan or Arrangement is used is decided based on config.
Note that the request body for an Arrangement challenge is different to that of a payment plan challenge (see examples).

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Helpdesk",
    "description": "The helpdesk API allows customers to interact and manage their accounts on our platform.",
    "version": "10.0.2"
  },
  "tags": [
    {
      "name": "payments",
      "description": "Endpoints for payment management."
    }
  ],
  "servers": [
    {
      "url": "{protocol}://{domain}/helpdesk",
      "description": "Dynamic server",
      "variables": {
        "protocol": {
          "enum": [
            "http",
            "https"
          ],
          "default": "https"
        },
        "domain": {
          "enum": [
            "public.glabs.financial-cloud.co.uk",
            "localhost:8080"
          ],
          "default": "public.glabs.financial-cloud.co.uk"
        }
      }
    }
  ],
  "paths": {
    "/payment/plans/3dscardchallenge": {
      "post": {
        "summary": "Challenge 3DSv2 Card",
        "description": "POST request for completing the challenge flow for a 3DSv2 Card - Payment Plans and Arrangements.\nWhether Payment Plan or Arrangement is used is decided based on config.\nNote that the request body for an Arrangement challenge is different to that of a payment plan challenge (see examples).",
        "tags": [
          "payments"
        ],
        "security": [
          {
            "ReferenceAuth": []
          },
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "reference",
            "schema": {
              "type": "integer"
            },
            "description": "Reference number of account to save card to while logged out, if x-access-token is sent, this is ignored"
          },
          {
            "in": "query",
            "name": "token",
            "schema": {
              "type": "string"
            },
            "description": "Reference uuid for paymentToken"
          }
        ],
        "requestBody": {
          "description": "The body to complete the challenge flow for a 3DSv2 Card. Note that payment plans require paymentPlanLUUID, whereas arrangements do not",
          "content": {
            "application/json": {
              "examples": {
                "Payment Plan": {
                  "value": {
                    "cardDetails": {
                      "cardExpiration": "032025",
                      "address1": "4",
                      "address2": "Privet Drive",
                      "townCity": "Surrey",
                      "country": "United Kingdom",
                      "postcode": "RH100AB",
                      "cardNumber": "5100013084486761",
                      "cardCVV": "123"
                    },
                    "email": "contact@financial-cloud.com",
                    "firstName": "Harry",
                    "lastName": "Potter",
                    "dob": "1988-03-29",
                    "browserData": {
                      "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
                      "javaEnabled": "true",
                      "javascriptEnabled": "true",
                      "language": "en-US",
                      "screenHeight": "1080",
                      "screenWidth": "1920",
                      "challengeWindowSize": "WINDOWED_600X400",
                      "timezone": "0",
                      "colorDepth": "SIXTEEN_BITS",
                      "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
                    },
                    "notificationUrl": "https://notification-url.com",
                    "contactUrl": "https://contact-url.com",
                    "amount": 11.01,
                    "date": "2023-07-07T13:38:46.957Z",
                    "frequency": "single",
                    "cres": "a-test-cres",
                    "originalTransactionId": "1234",
                    "paymentPlanLUUID": "e35406c1-fa38-424f-965e-94f07d0d0dfb"
                  }
                },
                "Arrangement": {
                  "value": {
                    "cardDetails": {
                      "cardExpiration": "032025",
                      "address1": "4",
                      "address2": "Privet Drive",
                      "townCity": "Surrey",
                      "country": "United Kingdom",
                      "postcode": "RH100AB",
                      "cardNumber": "5100013084486761",
                      "cardCVV": "123"
                    },
                    "email": "contact@financial-cloud.com",
                    "firstName": "Harry",
                    "lastName": "Potter",
                    "dob": "1988-03-29",
                    "browserData": {
                      "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
                      "javaEnabled": "true",
                      "javascriptEnabled": "true",
                      "language": "en-US",
                      "screenHeight": "1080",
                      "screenWidth": "1920",
                      "challengeWindowSize": "WINDOWED_600X400",
                      "timezone": "0",
                      "colorDepth": "SIXTEEN_BITS",
                      "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
                    },
                    "notificationUrl": "https://notification-url.com",
                    "contactUrl": "https://contact-url.com",
                    "amount": 11.01,
                    "date": "2023-07-07T13:38:46.957Z",
                    "frequency": "single",
                    "cres": "a-test-cres",
                    "originalTransactionId": "1234"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/threeDSCardChallengeDetails"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "3DSv2 Card Challenge Flow successfully completed",
            "content": {
              "application/json": {
                "examples": {
                  "Arrangement": {
                    "value": {
                      "success": true,
                      "message": "The arrangement has been set up successfully, the customers card has been debited £11.01.",
                      "paymentSuccess": true,
                      "paymentMessage": "3DS Card Successfully Challenged",
                      "UUID": "7251fda0-1e47-4143-ab33-b8387172c35c",
                      "authNumber": "9415",
                      "originalTransactionId": "BBBB"
                    }
                  },
                  "Payment Plan": {
                    "value": {
                      "success": true,
                      "message": "3DS Card successfully challenged",
                      "paymentSuccess": true,
                      "paymentMessage": "3DS Card Successfully Challenged",
                      "UUID": "9d9f5fca-4695-4827-a52e-abd55ef4fd78",
                      "originalTransactionId": "BBBB"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "400": {
            "description": "There was an error completing the 3DSv2 Card Challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-access-token"
      },
      "ReferenceAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "reference"
      }
    },
    "schemas": {
      "frequency": {
        "type": "string",
        "description": "Required. Frequency of the payment",
        "example": "monthly",
        "enum": [
          "monthly",
          "4-weekly",
          "bi-weekly",
          "weekly",
          "first working day",
          "last working day",
          "first monday",
          "first tuesday",
          "first wednesday",
          "first thursday",
          "first friday",
          "first saturday",
          "first sunday",
          "second monday",
          "second tuesday",
          "second wednesday",
          "second thursday",
          "second friday",
          "second saturday",
          "second sunday",
          "third monday",
          "third tuesday",
          "third wednesday",
          "third thursday",
          "third friday",
          "third saturday",
          "third sunday",
          "fourth monday",
          "fourth tuesday",
          "fourth wednesday",
          "fourth thursday",
          "fourth friday",
          "fourth saturday",
          "fourth sunday",
          "last monday",
          "last tuesday",
          "last wednesday",
          "last thursday",
          "last friday",
          "last saturday",
          "last sunday"
        ]
      },
      "browserData": {
        "type": "object",
        "description": "Browser-related data for the transaction.",
        "required": [
          "acceptHeader",
          "javaEnabled",
          "javascriptEnabled",
          "language",
          "screenHeight",
          "screenWidth",
          "challengeWindowSize",
          "timezone",
          "colorDepth",
          "userAgent"
        ],
        "properties": {
          "acceptHeader": {
            "type": "string",
            "description": "The Accept HTTP header from the customer's browser.",
            "example": "text/html"
          },
          "javaEnabled": {
            "type": "string",
            "description": "Indicates if Java is enabled in the browser.",
            "example": "true"
          },
          "javascriptEnabled": {
            "type": "string",
            "description": "Indicates if JavaScript is enabled in the browser.",
            "example": "true"
          },
          "language": {
            "type": "string",
            "description": "The language setting of the customer's browser.",
            "example": "en-US"
          },
          "screenHeight": {
            "type": "string",
            "description": "The screen height of the customer's device.",
            "example": "900"
          },
          "screenWidth": {
            "type": "string",
            "description": "The screen width of the customer's device.",
            "example": "1440"
          },
          "challengeWindowSize": {
            "type": "string",
            "description": "The window size for 3D Secure challenges.",
            "example": "250x400"
          },
          "timezone": {
            "type": "string",
            "description": "The timezone setting of the customer's device.",
            "example": "UTC"
          },
          "colorDepth": {
            "type": "string",
            "description": "The color depth of the customer's device screen.",
            "example": "24"
          },
          "userAgent": {
            "type": "string",
            "description": "The user agent string from the customer's browser.",
            "example": "Mozilla/5.0"
          }
        }
      },
      "Identity": {
        "title": "LUUID",
        "description": "An object containing the LUUID of the document",
        "type": "object",
        "example": {
          "LUUID": "2ae526b8-8953-4867-b18a-e54aa797bcce"
        },
        "properties": {
          "LUUID": {
            "type": "string",
            "description": "The Lifetime UUID of the document/ entity",
            "example": "2ae526b8-8953-4867-b18a-e54aa797bcce"
          }
        }
      },
      "threeDSCardChallengeDetails": {
        "title": "3DSv2 Card Challenge Request",
        "description": "This request body is used for creating a 3DSv2 Card Plan, with the additional fields: 'cres', 'originalTransactionId', and 'paymentPlanLUUID' (only for payment plans).",
        "type": "object",
        "example": {
          "cres": "encodedString12345",
          "originalTransactionId": "txn12345",
          "paymentPlanLUUID": "plan12345",
          "date": "2023-09-15",
          "frequency": "monthly",
          "amount": 100,
          "firstName": "John",
          "lastName": "Doe",
          "dob": "1990-01-01",
          "email": "john.doe@example.com",
          "notificationUrl": "https://example.com/notify",
          "contactUrl": "https://example.com/contact",
          "requestChallenge": true
        },
        "required": [
          "amount",
          "date",
          "frequency",
          "cres",
          "originalTransactionId",
          "cardDetails",
          "firstName",
          "lastName",
          "dob",
          "email",
          "browserData",
          "notificationUrl",
          "contactUrl"
        ],
        "properties": {
          "cres": {
            "type": "string",
            "description": "Required. Challenge Request Encoded String for 3DSv2 authentication.",
            "example": "encodedString12345"
          },
          "originalTransactionId": {
            "type": "string",
            "description": "Required. Original transaction ID for referencing the challenge.",
            "example": "txn12345"
          },
          "cardDetails": {
            "$ref": "#/components/schemas/CardDetails"
          },
          "paymentPlanLUUID": {
            "type": "string",
            "description": "Optional. Required only if the challenge is for a payment plan.",
            "example": "plan12345"
          },
          "date": {
            "type": "string",
            "description": "Required. Date for the payment plan, formatted as YYYY-MM-DD.",
            "example": "2023-09-15"
          },
          "frequency": {
            "$ref": "#/components/schemas/frequency"
          },
          "amount": {
            "type": "number",
            "description": "Required. Amount for the payment plan.",
            "example": 100
          },
          "firstName": {
            "title": "First Name",
            "type": "string",
            "description": "Required. First name of the cardholder.",
            "example": "John"
          },
          "lastName": {
            "title": "Last Name",
            "type": "string",
            "description": "Required. Last name of the cardholder.",
            "example": "Doe"
          },
          "dob": {
            "title": "Date of Birth",
            "type": "string",
            "description": "Required. Date of birth of the cardholder, formatted as YYYY-MM-DD.",
            "example": "1990-01-01"
          },
          "email": {
            "title": "Email",
            "type": "string",
            "description": "Required. Email address of the cardholder.",
            "example": "john.doe@example.com"
          },
          "browserData": {
            "$ref": "#/components/schemas/browserData"
          },
          "notificationUrl": {
            "title": "Notification URL",
            "type": "string",
            "description": "Required. URL where transaction notifications will be sent.",
            "example": "https://example.com/notify"
          },
          "contactUrl": {
            "title": "Contact URL",
            "type": "string",
            "description": "Required. URL for contacting the merchant.",
            "example": "https://example.com/contact"
          },
          "requestChallenge": {
            "title": "Request a Challenge",
            "type": "boolean",
            "description": "Optional. Whether a 3D Secure challenge should be requested.",
            "example": true
          }
        }
      },
      "CardDetails": {
        "title": "CardDetails",
        "description": "Schema for providing card and associated address details.",
        "required": [
          "cardExpiration",
          "address1",
          "townCity",
          "postcode",
          "cardNumber",
          "cardCVV"
        ],
        "type": "object",
        "example": {
          "cardExpiration": "12/2025",
          "address1": "123 Main St",
          "address2": "Apt 4",
          "townCity": "Smalltown",
          "country": "United Kingdom",
          "postcode": "12345",
          "cardNumber": "4111111111111111",
          "cardCVV": "123"
        },
        "properties": {
          "cardExpiration": {
            "title": "Card Expiration",
            "type": "string",
            "description": "The card expiry date in MM/YYYY format.",
            "example": "12/2025"
          },
          "address1": {
            "title": "Address Line 1",
            "type": "string",
            "description": "The first line of the cardholder's address.",
            "example": "123 Main St"
          },
          "address2": {
            "title": "Address Line 2",
            "type": "string",
            "description": "The second line of the cardholder's address. Optional.",
            "nullable": true,
            "example": "Apt 4"
          },
          "townCity": {
            "title": "Town / City",
            "type": "string",
            "description": "The town or city of the cardholder's address.",
            "example": "Smalltown"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "The country of the cardholder's address. Optional.",
            "nullable": true,
            "example": "United Kingdom"
          },
          "postcode": {
            "title": "Postal Code",
            "type": "string",
            "description": "The postal code of the cardholder's address.",
            "example": "12345"
          },
          "cardNumber": {
            "title": "Card Number",
            "type": "string",
            "description": "The 16-digit card number.",
            "minLength": 16,
            "maxLength": 16,
            "example": "4111111111111111"
          },
          "cardCVV": {
            "title": "Card CVV",
            "type": "string",
            "description": "The 3-digit CVV security code.",
            "minLength": 3,
            "maxLength": 4,
            "example": "123"
          }
        }
      },
      "GenericMessage": {
        "title": "GenericMessage",
        "type": "object",
        "required": [
          "message"
        ],
        "description": "A schema for generic message responses, often used for errors or notifications.",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string",
            "description": "A generic message detailing the nature of the response.",
            "example": "details do not match our records"
          }
        },
        "example": {
          "message": "details do not match our records"
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 237,
      "2": 233,
      "3": 61,
      "4": 213,
      "5": 219,
      "6": 87,
      "7": 0,
      "8": 100,
      "9": 246,
      "10": 124,
      "11": 81
    }
  }
}
```