No momento, esta página não está disponível em português
Online-payment icon

Redirect 3DS API-only integration

Support 3D Secure authentication through a redirect page.

Use our APIs to accept cards with 3D Secure authentication through a redirect page. When adding card payments with redirect 3D Secure authentication to your integration, you additionally need to:

  1. Collect the additional parameters in your payment form.
  2. Provide the required 3D Secure parameters when making a payment request.
  3. Handle the redirect.

Before you begin

Before starting your integration:

  1. If building a mobile integration, contact our Support Team to make sure that 3D Secure is triggered in your app.
  2. Make sure that you have integrated our Card Component for Web, iOS, or Android or built your own UI for collecting shopper's card details.
  3. If you are using 3D Secure for PSD2 compliance, read our comprehensive PSD2 SCA guide.

Collect additional parameters in your payment form

For higher authentication rates, we strongly recommend that you collect the card holder name, the shopper billing address and email address in advance in your payment form. Deliver these parameters to your backend when making a payment as they are required by the card schemes.

Collect card holder name in your payment form

If you are using our client-side integrations, select the integration below:

If you are using our Card Component, include the following when creating an instance of the Card Component:

  • hasHolderNametrue. This shows the input field for the card holder name.
  • holderNameRequired: true. This makes the card holder name a required field.
     const card = checkout.create("card", {
         hasHolderName: true,
         holderNameRequired: true
     }).mount("#card-container");

Make a payment

Select the channel that you are using below:

To make a card payment with 3D Secure redirect authentication on Web, proceed with the following steps:

  1. From your server, make a /payments request, specifying:

    Parameter name Required Description
    paymentMethod -white_check_mark- If using the Card Component for Web, pass the parameters returned by the Component. If submitting raw card data, refer to Raw card data for the fields that you need to pass.
    browserInfo -white_check_mark- The shopper's browser information. If using the Web Card Component, pass the state.data.browserInfo object from the onChange event.
    returnUrl -white_check_mark- The URL where the shopper will be redirected back to after completing 3D Secure authentication. The return URL can be a maximum of 1024 characters and must not include // (double slash) after the top-level domain.
    The URL should include the protocol: http:// or https://. You can also include your own additional query parameters, for example, shopper ID or order reference number. In the response, you receive a URL that requires a POST request.
    billingAddress The cardholder's billing address.
    shopperEmail The cardholder's email address.
    shopperIP The shopper's IP address.

    To increase the likelihood of achieving a frictionless flow and higher authorisation rates, we recommend that you send additional parameters.

    For channel Web, we recommend including these additional parameters: billingAddress, shopperEmail, and shopperIP.

    A sample /payments request for Web:

  2. Check if the response contains an action object. Your next steps depend on whether the /payments response contains an action object:

    Description Next steps
    No action object The transaction was either exempted or out-of-scope for 3D Secure authentication. Use the resultCode to present the payment result to your shopper.
    action object
    type:redirect
    The payment qualifies for 3D Secure. Handle the redirect.

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:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment has been successful.
If you are using manual capture, you also need to capture the payment.
Cancelled The shopper cancelled the payment. Ask the shopper if they want to continue with the order, or ask them to select a different payment method.
Error There was an error when the payment was being processed. For more information, check the refusalReason field. Inform the shopper that there was an error processing their payment.
Refused The payment was refused. For more information, check the refusalReason field. Ask the shopper to try the payment again using a different payment method.

Test and go live

Use our test card numbers to test how your integration handles different 3D Secure authentication scenarios.

See also