Skip to main content
Postman collection Implementation examples
Node.js
      Our Web Drop-in renders the available cards in your payment form, and securely collects any sensitive card information, so it doesn’t touch your server. Drop-in also redirects the shopper to perform the 3D Secure 2 authentication. Follow the instructions on this page if your integration uses the /payments or /payments/details endpoint, and Checkout API 49 or later.

If your integration uses only the /sessions endpoint, you do not need additional configuration for 3D Secure. If you are using Checkout API 46 or earlier, follow instructions in the 3D Secure 2 integration guide for v46 or earlier.
When adding card payments with redirect 3D Secure authentication to your integration, you additionally need to:
  1. Configure Drop-in to collect the card holder name.
  2. Provide the required 3D Secure parameters when making a payment request.
  3. Handle the redirect result after the shopper returns to your website.

Requirements

This page explains how to add cards with redirect 3D Secure authentication to an existing Web Drop-in integration. The Web Drop-in integration works the same way for all payment methods. If you haven’t done this integration yet, refer to our Drop-in integration guide. Before starting your integration:
  1. Make sure that you have set up your back end implementation, and added Drop-in to your payments form.
  2. Add the cards that you want to accept in your test Customer Area.
  3. If you are using 3D Secure for PSD2 compliance, read our comprehensive PSD2 SCA guide.

Show the available cards in your payment form

For information about the supported countries/regions and currencies for each card, refer to Payment methods. Drop-in uses the combination of countryCode and amount.currency from your /paymentMethods request to show the available cards to your shopper. When the shopper is entering their card details, Drop-in tries to recognize the card brand. When successful, Drop-in renders the brand icon and the corresponding input field for the card security code (CVC, CVV, or CID).

Collect additional parameters in your payment form

For higher authentication rates, we strongly recommend that you collect the card holder name, billing address, and email address for payments with 3D Secure authentication.

Configure Drop-in

When creating an instance of Drop-in, you can optionally specify the following fields:
You can also customize your shopper’s experience with optional configuration parameters and specific events.

Collect shopper email in your payment form

We also recommend that you collect the shopper email in advance in your payment form. Deliver this parameter to your backend when making a payment, because it is required by the card schemes.

Make a payment

When the shopper selects to pay, Drop-in calls the onSubmit event, which contains a state.data.
  1. Pass the state.data to your server.
  2. 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)

  3. 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.The following example shows a /payments response with action.type: redirect./payments response