Skip to content

3D-Secure

Use 3D-Secure In Debit Card Payment

To use 3D-Secure, you probably need to integrate the vendor based 3D-Secure JavaScript library first. Then you should specify "use3ds = true" in the card3dsInfo object of the payment request, and provide required parameters based on the vendor you are requesting.

After receiving the 3D-Secure request, an IN_PROGRESS payment response with authentication information will be returned. You should proceed with the 3D-Secure flow according to this information. Once the payer completes the authentication, the payment will be SETTLED.

Integrate 3D-Secure From Openpay

1) Specify a redirectUrl in the card3dsInfo object, which will be used by Openpay to redirect the payer after the 3D-Secure authentication is completed. Example request and response are:

Create A Payment With 3D-Secure

POST /v1/payments/charges/card

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Request Body
{
    "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "amount": 1000,
    "country": "MX",
    "currency": "MXN",
    "paymentMethod": "DEBIT_CARD",
    ...  # other basic request fields
    "card3dsInfo": {
        "use3ds": true,
        "redirectUrl": "https://www.liquido.com"  // Where to redirect the payer
    },
    "subMerchantId": "UUID",
    ...  # other basic request fields
}
Response
{
    "transferStatusCode": 200,
    "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "paymentMethod": "DEBIT_CARD",
    "amount": 1000,
    "currency": "MXN",
    "finalAmount": 1000,
    "finalCurrency": "MXN",
    "country": "MX",
    "createTime": "2022-03-01 17:53:18 GMT-08:00",
    "scheduledTime": "2022-03-01 17:53:18 GMT-08:00",
    ...  # other basic response fields
    "transferDetails": {
        "card": {
            "cardInfo": {
                "cardHolderName": "card_holder_name",
                "expirationMonth": 9,
                "expirationYear": 2024,
                "brand": "VISA",
                "bin": "458124",
                "last4": "0000"
            },
            "cardId": "8736453a-dad0-4f26-85f0-95e8787d0237",
            "card3dsInfo": {
                "use3ds": true,
                "redirectUrl": "https://www.liquido.com",
                "authenticationUrl": "https://api.openpay.mx/v1/mdo1yf2/charges/trsa4og/redirect/"
            }
        }
    },
    "transferStatus": "IN_PROGRESS",
    "description": "this is a test pay",
    "subMerchantId": "UUID"
}

2) As seen in the example response above, Openpay will provide an authenticationUrl for completing the 3D-Secure challenge by the card issuer bank if necessary.

3) The browser must now redirect the payer to the authenticationUrl to complete the authentication.

4) Once the payer completes the authentication, Openpay will redirect the payer to the redirectUrl registered in Step 1, and the payment will be settled.

Back to top