Skip to main content
Use our Redirect Component to redirect the shopper to perform 3D Secure 2 authentication. When adding card payments with redirect 3D Secure authentication to your integration, you additionally need to:
  1. Collect additional parameters in your payment form.
  2. Provide the required 3D Secure parameters when making a payment request.
  3. Use the Redirect Component to handle the redirect.

Requirements

Before starting your integration:
  1. Make sure that you have integrated our Card Component, or built your own UI for collecting shopper’s card details.
  2. If you are using 3D Secure for PSD2 compliance, read our comprehensive PSD2 SCA guide.

Collect additional information at checkout

For higher authentication rates, we strongly recommend that you collect the cardholder name for payments with 3D Secure authentication. To collect the cardholder name using our Card Component, specify the following when adding the Card Component:
  • showsHolderNameField: true
We also recommend that you collect the shopper billing address in advance in your payment form. Deliver this parameter to your backend when making a payment as it is required by the card schemes.

Make a payment

  1. When you make a payment request, include the following additional 3D Secure 2 parameters. See additional 3D Secure 2 parameters that we recommend to include in your request to increase authentication performance in our API reference. This is the required icon. Required for all transactions.
    This is the conditionally required icon. Required for particular setups, or issuers and card schemes.
    This is the recommended icon. Recommended for all transactions, but not required.

    curl

    Java

    PHP

    C#

    NodeJS (JavaScript)

    Go

    Python

    Ruby

    NodeJS (TypeScript)

  2. In the response, check if there is an action object. Your next steps depend on whether the response contains an action object, and on the action.type. A sample /payments response with action.type: redirect: /payments response

Handle the redirect

Use the Redirect Component to redirect the shopper to complete the 3D Secure authentication.
  1. Create and persist an instance of the Redirect Component.
    Than use it to handle the action:
  2. You then need to inform the Component when shopper returns to your app. To do this, implement the following in your UIApplicationDelegate:
    After the Redirect Component completes the action, it invokes the didProvide method.
  3. From your server, make a POST /payments/details request providing the data from the didProvide method from your client app. On Checkout API v67 and later, the payment is authorized after the shopper completes authentication. You make a /payments/details request to get the payment result. On earlier versions, you need to complete the payment by making a /payments/details request containing payment data.

    curl

    Java

    PHP

    C#

    NodeJS (JavaScript)

    Python

    Ruby

    You receive a response containing: /payments/details response
For more information and detailed instructions, refer to Using the Redirect Component.

Present the payment result

Use the  resultCode from the /payments or /payments/details response to present the payment result to your shopper. You will also receive the outcome of the payment asynchronously in a webhook. For card payments, you can receive the following resultCode values:

Test and go live

Use our test card numbers to test how your integration handles different 3D Secure authentication scenarios. When you are ready to go live, follow our go-live checklist. When using our live endpoints, make sure that all API requests you make for the same payment session use the same live endpoint region. Using different regions for /payments and /payments/details requests may result in errors when authenticating with 3D Secure.

See also