Skip to main content

Documentation

Creating a Card Payment With 3DS Authentication

Create a card payment that requires 3DS authentication.

Use this procedure when the response to Get Payment Method Required Fields includes the 3d_required field.

For example, a buyer uses a card for a purchase on a website. Because of the amount, you require authentication.

Note

Can you require 3DS authentication for a card payment? It depends on the response to Get Payment Method Required Fields.

'Get Payment Method Required Fields' response

  • If the 3d_required object does not appear - You cannot request 3DS authentication for the payment method.

  • If the 3d_required object appears - You can request 3DS authentication for the payment method.

  • If is_required is true for the 3d_required object - You must include the 3d_required field In the 'Create Payment' request.

  • If is_required is false for the 3d_required object - You can include the 3d_required field In the 'Create Payment' request.

'Create Payment' request

  • If you set the 3d_required field to true - 3DS authentication will be performed, if it is available for the payment method.

  • If you set the 3d_required field to false - 3DS authentication will not be performed.

Note: The card issuer might require 3DS authentication even when you don't.

Procedure

  1. Create a payment as described in Create Payment, with the following settings:

    • payment_method - Specify the payment method ID or an object that contains all the required fields for a card.

    • payment_method_options.3d_required - Set to true.

    {
        "payment_method": "card_4facd9b188f2025fdbedb3ab447719ba",
        "payment_method_options": {
            "3d_required": true
        }
    }

    The response shows:

    {
            "redirect_url": "https://dashboard.rapyd.net/3ds-payment?token=payment_db7f7f5668c25ba4c3eda461a401273d",
    //         . . .
    }
    
  2. Send the URL to the buyer.

  3. The buyer opens the URL. An authentication page opens and the buyer receives an authentication code.

  4. The buyer enters the code on the authentication page. Rapyd completes the payment.

Note

To simulate the buyer's authentication in the sandbox, see Simulating 3DS Authentication - API Method.

Code Examples

See the Payment by card - 3DS required code example on Create Payment.