3D Secure

What is 3D Secure?

3D Secure (3DS) is a messaging protocol that enables consumers authenticate with their card issuer when making Card Not Present transactions. The specification was developed by EMVCo and can be found here.

This platform supports 3D Secure 2 (2.1.0, 2.2.0). The issuer uses many parameters to verify card holder authenticity and also asses the risk level to authorize transactions.

Integrating 3D Secure in your application.

Step 1 - Initiate 3D Secure Flow

To use 3D Secure, your backend system must initiate the flow by setting attempt3DSecure to true while making the https://<Host>/api/payments/sale API call. It is also required to provide browserInfo parameter when using 3D secure.

Here is the sample response when you initiate the 3DS flow while making the https://<Host>/api/payments/sale API call

{
    "data": {
        "ID": "785bee37-8e14-427e-ab07-a3b0c16756a7",
        "TransactionID": "06c2aa36-f968-4205-a5dd-8bf455bdad59",
        "MerchantID": "e6803b29-68a4-4c2a-b3ee-019dfad86c61",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "Description": "Payment for the services",
        "ThreeDSActionRequired": false,
        "token": "card_sandbox_tE8BT9Betjsp7PV46IS9xb1c",
        "ThreeDSType": "frictionless",
        "ThreeDSStatus": "succeeded",
        "ThreeDSData": "eyJ0IjoiMDZjMmFhMzYtZjk2OC00MjA1LWE1ZGQtOGJmNDU1YmRhZDU5IiwiZSI6InNhbmRib3giLCJzIjoiMjAyMi0wMS0xOVQyMjozNDoyMS4wNzJaIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJjZjRjOGI2NS0wZjc5LTQzZjYtODhiZi0wMmYwNzYzZTgxMGQiLCJ0aHJlZURTTWV0aG9kVVJMIjoiaHR0cHM6Ly9hY3Muc2FuZGJveC4zZHNlY3VyZS5pby8zZHNtZXRob2QifQ",
        "SaleResponse": {
            "status": "PENDING_3DSAUTH"
        },
        "Metadata": {
            "customerId": "123",
            "email" : "[email protected]"
        }
    }
}

Note: The response will include a transaction ID, which you will use in Step 3 to retrieve transaction details.

Step 2 - Handle 3D Secure Actions

If the response from the https://<Host>/api/payments/sale API call indicates that a 3D secure action is required (i.e. ThreeDSActionRequired=true ), your backend should send the information back to your frontend so the 3DS authentication flow can be performed.

On your frontend, you can easily manage the flow by initiating PayEngine.perform3DSFlow(...) method.

Step 3 - Retrieve Completed Transaction

Once you receive confirmation that sale with 3D Secure has been completed, you can use server-to-server communication to retrieve the transaction details using the transaction ID returned in the /sale API call (Refer here for the sample response)

To retrieve transaction detail, please use https://<Host>/api/merchant/:merchantId/3dstransaction/:transactionId API from your server application using the private API key.

Example: Complete 3DS flow

1. Your client application attempts a secure sale through your backend system.

2. Your backend service initiates 3DS workflow by setting attempt3DSecure to true when making a sale call to the system (see /api/payments/sale).

3. Your client application checks for 3D secure action required and initiates action handling by calling PayEngine.perform3DSFlow(...)

4. Once 3DS transaction is completed successfully, your client application can call your backend system to request for transaction detail.

Last updated