Search docs

Are you looking for test card numbers?

Would you like to contact support?

Start searching Adyen's documentation...

  Documentation

Authentication-only integration

Use Adyen as a standalone 3D Secure 2 provider. Perform only the 3D Secure 2 authentication with us and submit the payment authorisation later.

This page describes authentication-only integration for /payments API. If you are using a classic integration, see 3D Secure 2 Classic integration.

In a 3D Secure 2 authentication-only flow, you perform the 3D Secure 2 authentication independent of the payment authorisation flow. The transaction can go through either a frictionless or a challenge authentication flow. If the 3D Secure authentication is successful, you will get the authentication data that you will need to authorise the payment with another PSP or acquirer. If the authentication is successful, you will get the authentication data that you will need to authorise the payment with another PSP or acquirer.

If after the authentication you decide to process the payment with us, we also provide a way so that you can continue with the payment authorisation with Adyen.

Before you begin

Before you can start accepting 3D Secure 2 authenticated transactions on browsers or in-app, make sure that you:

  1. Sign up for an Adyen test account at https://www.adyen.com/signup
  2. Get your API Key. Save a copy as you'll need it for API calls you make to the Adyen payments platform.
  3. Read and understand the full 3D Secure 2 API integration guide

Integration steps

  1. Collect the shopper's card details and proceed to submit an authentication request.
  2. Use the resultCode from the response to determine your next action. For example, you might need to get the 3D Secure 2 device fingerprint, or present a challenge to the shopper, or both.
  3. If the transaction was successfully authenticated, get the 3D Secure 2 authenticated data that you will need to authorise the payment with another PSP or acquirer. Alternatively, you can also proceed to authorise the transaction with Adyen.

To test your integration, see Testing 3D Secure 2.

Step 1: Submit a payment authentication request

If you did not enrol your merchant ID (MID) with card schemes through Adyen (for example, you enrolled for 3D Secure 2 through a different acquirer or PSP), skip this step and proceed to include additional acquirer-related data instead.

Submit an authentication request with a /payments call containing the required 3D Secure 2 fields, the acquirer fields listed previously, and the authenticationOnly parameter:

  • authenticationOnlytrue
We recommend that you provide all available information to increase the likelihood of achieving a frictionless flow and a higher authorisation rate. In addition to the regular parameters you provide to Adyen, send additional parameters in this list.

Request

curl https://checkout-test.adyen.com/v41/payments \
-H "X-API-key: [Your API Key here]" \
-H "Content-Type: application/json" \
-d '{
  "amount":{
    "currency":"EUR",
    "value":1000
  },
  "reference":"YOUR_ORDER_NUMBER",
  "paymentMethod":{
    "type":"scheme",
    "number": "4212345678901245",
    "expiryMonth": "10",
    "expiryYear": "2020",
    "cvc": "737"
  },
  "additionalData" : {
     "allow3DS2" : true
  },
  "threeDS2RequestData": {
    "authenticationOnly": true
   },
  "browserInfo":{     
    "userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
    "acceptHeader":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
    "language":"nl-NL",
    "colorDepth":24,
    "screenHeight":723,
    "screenWidth":1536,
    "timeZoneOffset":0,
    "javaEnabled": true
  },
  "origin" : "https://your-company.com/",
  "returnUrl" : "https://your-company.com/checkout/",
  "merchantAccount":"YOUR_MERCHANT_ACCOUNT"
}'

Response

You'll receive a response containing:

For a complete list of resultCode values and the actions that you need to do, see Result codes.

{
  "resultCode": "IdentifyShopper",
  "authentication": {
    "threeds2.fingerprintToken": "eyJ0aH..."
  },
  "details": [
    {
      "key": "threeds2.fingerprint",
      "type": "text"
    }
  ],
  "paymentData": "Ab02b4c0!..."
}

For a complete list of resultCode values and the actions that you need to take, see Result codes.

Step 2: Get the 3D Secure 2 device fingerprint

If your server receives an IdentifyShopper resultCodeget the shopper's 3D Secure 2 device fingerprint. Otherwise, skip this step.

In the step where you submit the device fingerprinting result in a POST /payments/details request, include the authenticationOnly parameter.

  • threeDSAuthenticationOnlytrue

Request

{
  "details": {
    "threeds2.fingerprint": "eyJ0aHJlZURTQ29tcEluZCI6ICJZIn0="
  },
  "threeDSAuthenticationOnly": true,
  "paymentData": "PAYMENT_DATA..."
}

Response

You'll receive a response containing a resultCode

For a complete list of resultCode values and the actions that you need to take, see Result codes.

{
   "pspReference" : "9935519735144470",
   "resultCode" : "AuthenticationFinished",
   "threeDS2Result" : {
      "authenticationValue" : "REVBREJFRUZDQUZFQkFCRUZGRkY=",
      "dsTransID" : "32d1bf18-63b6-4028-8d9f-627038b75bd7",
      "eci" : "05",
      "threeDSServerTransID" : "a4817781-d668-4534-8bc2-b27c34cbfbe5",
      "transStatus" : "Y"
   }
}

Step 3: Present a challenge

If your server receives a ChallengeShopper resultCode, this means that the issuer would like to perform additional checks in order to verify that the shopper is indeed the cardholder. Present the challenge flow to the shopper and submit the results to Adyen.

If after performing the challenge you decide to continue the payment authorisation with Adyen, skip the step where you send the results in a POST /payments/details request. Proceed to Authorise the payment with Adyen instead.

In the step where you send the challenge result in a POST /payments/details request, you will get an AuthenticationFinished resultCode if the authentication was successful.

Request

{
  "details": {
    "threeds2.challengeResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ=="
  },
  "paymentData": "PAYMENT_DATA"
}

Response

{
   "pspReference" : "9935519735144470",
   "resultCode" : "AuthenticationFinished",
   "threeDS2Result" : {
      "authenticationValue" : "REVBREJFRUZDQUZFQkFCRUZGRkY=",
      "dsTransID" : "32d1bf18-63b6-4028-8d9f-627038b75bd7",
      "eci" : "05",
      "threeDSServerTransID" : "a4817781-d668-4534-8bc2-b27c34cbfbe5",
      "transStatus" : "Y"
   }
}

Proceed to Get authentication data for the fields that you will need to pass on to your PSP or acquirer.

Step 4: Get the 3D Secure 2 authenticated data

After the transaction is successfully authenticated, get the following parameters to process the payment authorisation with another PSP or acquirer:

  • transStatus returned in the first /payments/details response if the resultCode is AuthenticationFinished. If the transaction goes through the challenge flow, set this value to C.
  • transStatus returned in the second /payments/detailsresponse after you submit the challenge result.
  • authenticationValue: This is returned in a /payments/detailsresponse if the resultCode is AuthenticationFinished.
  • threeDSServerTransID:  This is returned in a /payments/detailsresponse if the resultCode is AuthenticationFinished.
  • eci: This is returned in a /payments/detailsresponse if the resultCode is AuthenticationFinished.
  • dsTransID: This is returned in a /payments/detailsresponse if the resultCode is AuthenticationFinished.
  • messageVersion: The value should be 2.1.0.

Optional: Provide additional acquirer-related data

Perform this step only if you did not enrol your merchant ID (MID) with the card schemes through Adyen (for example, you enrolled for 3D Secure 2 through a different acquirer or PSP). If you enrolled for 3D Secure 2 through Adyen, follow step 1 instead.

Get the following information from your acquirer. These information are part of the 3D Secure 2 enrollment process between your acquirer and card schemes.

If you are unable to get these values from your acquirer, contact Support Team.

  • acquirerBIN: The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation.
  • acquirerMerchantID: The authorisation MID enrolled for 3D Secure 2. This string should match the value that you will use in the authoriSation.
  • merchantName: The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorisation. Maximum length is 40 characters.
  • threeDSRequestorID: Required for Visa. Unique requestor ID assigned by the Directory Server when you enrol for 3D Secure 2.
  • threeDSRequestorName: Required for Visa. Unique requestor name assigned by the Directory Server when you enrol for 3D Secure 2.

Submit an authentication request with a /payments call containing the required 3D Secure 2 fields, the acquirer fields listed previously, and the authenticationOnly parameter:

  • authenticationOnly: true
We recommend that you provide all available information to increase the likelihood of achieving a frictionless flow and a higher authorisation rate. In addition to the regular parameters you provide to Adyen, send additional parameters in this list.

Request with additional acquirer-related information

curl https://checkout-test.adyen.com/v41/payments \
-H "X-API-key: [Your API Key here]" \
-H "Content-Type: application/json" \
-d '{
  "amount":{
    "currency":"EUR",
    "value":1000
  },
  "reference":"YOUR_ORDER_NUMBER",
  "paymentMethod":{
    "type":"scheme",
    "encryptedCardNumber":"adyenjs_0_1_18$MT6ppy0FAMVMLH...",
    "encryptedExpiryMonth":"adyenjs_0_1_18$MT6ppy0FAMVMLH...",
    "encryptedExpiryYear":"adyenjs_0_1_18$MT6ppy0FAMVMLH...",
    "encryptedSecurityCode":"adyenjs_0_1_18$MT6ppy0FAMVMLH..."
  },
  "additionalData" : {
     "allow3DS2" : true
  },
  "threeDS2RequestData": {
    "authenticationOnly": true,
    "acquirerBIN": "YOUR_ACQUIRER_BIN",
    "acquirerMerchantID": "YOUR_ACQUIRER_MERCHANT_ID",
    "merchantName": "YOUR_MERCHANT_NAME",
    "threeDSRequestorID": "YOUR_3DS_REQUESTOR_ID",
    "threeDSRequestorName": "YOUR_3DS_REQUESTOR_NAME"
   },
  "browserInfo":{
    "userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
    "acceptHeader":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
    "language":"nl-NL",
    "colorDepth":24,
    "screenHeight":723,
    "screenWidth":1536,
    "timeZoneOffset":0,
    "javaEnabled": true,
    "acceptHeader": "text/html" //Retrieve this from your sever.
  },
  "origin" : "https://your-company.com/",
  "returnUrl" : "https://your-company.com/checkout/",
  "merchantAccount":"YOUR_MERCHANT_ACCOUNT"
}'

Response

You'll receive a response containing:

For a complete list of resultCode values and the actions that you need to do, see Result codes.

{
  "resultCode": "IdentifyShopper",
  "authentication": {
    "threeds2.fingerprintToken": "eyJ0aH..."
  },
  "details": [
    {
      "key": "threeds2.fingerprint",
      "type": "text"
    }
  ],
  "paymentData": "Ab02b4c0!..."
}

Optional: Authorise the payment with Adyen

If after completing the authentication flow you decide to proceed with authorising the payment with Adyen, you can still switch and continue with a payment authorisation.

Make a POST /payments/details request from your server and include the following parameters: 

  • threeDSAuthenticationOnlyfalse

Request

{
  "details": {
    "threeds2.challengeResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ=="
  },
  "threeDSAuthenticationOnly": false,
  "paymentData": "PAYMENT_DATA"
}

Response

You'll receive Authorised as the resultCode if the payment was successful.

{
    "pspReference": "8825495331860022",
    "resultCode": "Authorised"
}

Authentication data expiry

Authentication data and cryptograms expire depending on card schemes' rules. This means that you can no longer use the authentication data after it expires.

  • For Visa, cryptograms are valid for 1 year.
  • For Mastercard, cryptograms are valid for 30 days. Starting from 2020, Mastercard will support non-expiring cryptograms but the expiry will depend on the issuing bank's implementation.
  • For Amex, cryptograms are valid for 45 days.

Testing 3D Secure 2

Use the following test cards along with the amounts in the next table to test 3D Secure 2 authentication scenarios.

Card Type Card Number Expiry Month Expiry Year Security Code (CVC/CVV) When to use this card
Visa 4212 3456 7890 1245 10 2020 737 To test any 3D Secure 2 authentication scenario for Visa.
Mastercard 5212 3456 7890 1242 10 2020 737 To test any 3D Secure 2 authentication scenario for Mastercard.
Visa 4212 3456 7891 0006 10 2020 737 To test the web-based authentication flow where you immediately get a ChallengeShopper resultCode right after the /payments request.

Specific authentication scenario

Amount Authentication scenario
12002 Frictionless
12100 Basic text authentication
12110 Basic single select
12120 Basic multi select
12130 Basic out-of-band (OOB) authentication
12140 HTML OOB authentication
12150 App single select then text authentication

When prompted for 3D Secure 2 text challenges, use the following credentials:

  • For mobile, use password: 1234
  • For web, use password: password