Pesquisar

Are you looking for test card numbers?

Would you like to contact support?

Atenção, esta página não se encontra disponível em Português
Classic-integration icon

Authentication-only integration

Learn how you can integrate with Adyen as a standalone 3D Secure 1 provider.

This page is for our classic Direct API (/authorise) integration. If you are integrating using our Checkout APIs, refer to the 3D Secure authentication-only on Checkout API documentation instead.

Implement a 3D Secure 1 fallback implementation in case the issuer does not support 3D Secure 2 authentication-only integration yet. In the response, you will get the authentication data that you need to authorise the payment with another PSP or acquirer.

If after the authentication you decide to process the payment with us, you can also continue with the payment authorisation with Adyen.

Before you begin

Before you can start accepting 3D Secure 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 plataforma de pagamentos da Adyen.
  3. Read and understand the full 3D Secure 1 Classic API integration guide

Step 1: Submit a payment authentication request

Submit an authentication request with a /authorise call containing the required 3D Secure 1 parameters and the threeDSAuthenticationOnly parameter:

  • threeDSAuthenticationOnly: Set this to true.
/authorise request
curl https://pal-test.adyen.com/pal/servlet/Payment/v46/authorise \
-H "X-API-key: [Your API Key here]" \
-H "Content-Type: application/json" \
-d '{
      "amount":{
        "currency":"EUR",
        "value":2100
      },
      "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
      "reference":"YOUR_REFERENCE_NUMBER",
      "threeDSAuthenticationOnly": true,
      "additionalData": {
        "executeThreeD": 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":"en",
        "colorDepth":24,
        "screenHeight":723,
        "screenWidth":1536,
        "timeZoneOffset":0,
        "javaEnabled":false
      },
      "card": {
        "number": "4212345678901237",
        "expiryMonth": "03",
        "expiryYear": "2030",
        "cvc": "737",
        "holderName": "Simon Hopper"
      }
    }'

You'll receive a response containing:

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

/authorise response
{
    "pspReference": "8825536842162448",
    "resultCode": "RedirectShopper",
    "issuerUrl": "https://test.adyen.com/hpp/3d/validate.shtml",
    "md": "djIhR2R6NkNkdVFROVdFc1YrN1B3cmZ3dz09IfNZPuc4S9doxv...=",
    "paRequest": "eNpVUttuwjAM/RXGB5A0baFUJlIHSEMal3F5nrLU9gH...="
}

Step 2: Perform the 3D Secure 1 authentication flow

  1. Redirect the shopper to the card issuer to perform authentication. After a successful authentication, the card issuer returns the shopper to your site and sends an HTTP POST to your TermUrl containing the following:

    • MD: Payment session identifier.
    • PaRes: Payment authorisation response.
  2. Get the MD and PaRes values and proceed to submit the authentication result.

If after performing the authentication you decide to continue the payment authorisation with Adyen, skip the next step proceed to Authorise the payment with Adyen instead.

Step 3: Submit the result and get the authentication data

  1. Submit the authentication result in an /authorise3d request:
  • md: Payment session identifier, MD, returned by the card issuer in the previous step.
  • paResponse: Payment authorisation response, PaRes, returned by the card issuer in the previous step.
  • threeDSAuthenticationOnly: Set this to true.

    /authorise3d request
    curl https://pal-test.adyen.com/pal/servlet/Payment/v46/authorise3d \
    -H "X-API-key: [Your API Key here]" \
    -H "Content-Type: application/json" \
    -d '{
        "md": "djIhR2R6NkNkdVFROVdFc1YrN1B3cmZ3dz09IfNZPuc4S9doxvKxoki3cg..=",
        "paResponse": "eNrNV1mTqsgSfvdXdJx5ZOawC56gjSgWFZUdQXhjkx0UkMVff2md6dM..=",
        "threeDSAuthenticationOnly": true,
        "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
    }'

You'll receive a response containing:

  • resultCode: If the authentication process has finished, you receive AuthenticationFinished.
  • additionalData.threeDAuthenticatedResponse: Indicates the results of the authentication. The value Y means that authentication was successful. If you get another value, see the list of possible values to learn what it means.

    /authorise3d response
    {
        "additionalData": {
            "cavv": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=",
            "xid": "ODgyNTUzNjg0MjE2MjQ0OAAAAAA=",
            "threeDAuthenticatedResponse": "Y",
            "cavvAlgorithm": "1",
            "threeDOfferedResponse": "Y",
            "eci": "02",
            "authorisationMid": "1000",
            "acquirerCode": "TestPmmAcquirerAccount"
        },
        "pspReference": "8825536842162448",
        "resultCode": "AuthenticationFinished"
    }
  1. If you received Y in additionalData.threeDAuthenticatedResponse, you can continue to the next step to authorise the payment.

See our API reference to learn more about the response parameters and how the values map to 3D Secure specifications.

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 /authorise3d request from your server and include the following parameters: 

  • threeDSAuthenticationOnly: Set this to false.
/authorise3d request - Continue authorising with Adyen
{
    "md": "djIhR2R6NkNkdVFROVdFc1YrN1B3cmZ3dz09IfNZPuc4S9doxvKxoki3cg..=",
    "paResponse": "eNrNV1mTqsgSfvdXdJx5ZOawC56gjSgWFZUdQXhjkx0UkMVff2md6dM..=",
    "threeDSAuthenticationOnly": false,
    "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}

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

/authorise3d response - Successful authorisation
{
    "pspReference": "8825495331860022",
    "resultCode": "Authorised"
}