Skip to main content

Documentation

Simulating 3DS Authentication - Hosted Page

When a hosted page requires 3DS authentication for a card operation, you can simulate the authentication in the sandbox. Relevant where the payment method category is card.

The 3DS simulator authenticates the card, the operation is completed, and Rapyd sends a webhook.

Card operations with 3DS authentication must be authenticated within 15 minutes.

3DS authentication is available for the following card operations:

  • Create Checkout Page

  • Save Card Details

To simulate 3DS authentication in the sandbox:

Method

Description

Create Checkout Page

Set amount to 1000 or above. Certain amounts above 2000 trigger specific errors instead of the 3DS flow. See Error Simulation.

Create Card Token

Creates a token that represents the card. Use the token to create payments later. The simulator requires 3DS for all card payment methods. In production, the requirements differ from card to card.

When authentication is complete, Rapyd returns the following webhooks:

Method

Webhook

Create Checkout Page

PAYMENT_COMPLETED

Create Card Token

CUSTOMER_UPDATED

The example below illustrates creating a checkout page for a card payment that requires 3DS authentication, using the checkout page, and simulating the authentication.

Creating a Checkout Page with 3DS Authentication

To create a checkout page for a payment that requires 3DS authentication, specify an amount above 1000. See Create Checkout Page.

Create Checkout Page Request

In this example, the value of amount is 1050.

Request URL - post https://sandboxapi.rapyd.net/v1/checkout

{
    "amount": 1050,
    "country": "US",
    "currency": "USD",
    "payment_method_type": "us_visa_card"
}
Create Checkout Page Response
{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "6cb9f46d-2c5b-4efe-8de2-6f19cdafc9f4"
    },
    "data": {
        "id": "checkout_09fe498440294d5463ea9220c47fda62",
        "status": "NEW",

 //     ...        

        "redirect_url": "https://sandboxcheckout.rapyd.net?token=checkout_09fe498440294d5463ea9220c47fda62",

 //     ...            

        "country": "US",
        "currency": "USD",
        "amount": 1050,

 //     ...    

        "payment_method_type": "us_visa_card",

 //     ...    
    }
}

In the data section:

  • redirect_url - The URL for the checkout page.