Are you looking for test card numbers?

Would you like to contact support?

No momento, esta página não está disponível em português
Classic-integration icon

Authorise a payment with 3D Secure 2 authenticated data

Submit a payment authorisation with Adyen, using authentication data from a third-party 3D Secure 2 provider.

This page is for our Classic API (/authorise) integration. If you are integrating using our Checkout APIs, refer to the authorisation-only integration on Checkout API documentation instead.

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 plataforma de pagamentos da Adyen.
  3. Install one of our Libraries to connect with the Adyen APIs. For more information on these steps, refer to Get started with Adyen.

Get authentication data

If you didn't authenticate with Adyen, refer to Mapping Adyen parameters to EMVCo ones.

To authorise a 3D Secure 1 authenticated payment, you need the following data:

Send a payment authorisation request with 3D Secure authentication data

Co-branded cards

If you are authorising for a co-branded card, you need to set the paymentMethod.type value to the scheme that authenticated the payment. For example, if you are authorising for a card co-branded with Visa and Cartes Bancaires, set the value to either visa or cartebancaire, depending on which scheme performed the authentication. Otherwise, the authorisation can be refused.

Sample request

/authorise request
curl https://pal-test.adyen.com/pal/servlet/Payment/v68/authorise \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "card":{
    "cvc":"737",
    "expiryMonth":"03",
    "expiryYear":"2030",
    "holderName":"Simon Hopper",
    "number":"4035501428146300"
  },
  "selectedBrand": "visa",
  "amount":{
    "value":1499,
    "currency":"EUR"
  },
  "mpiData":{
    "cavv":"3q2+78r+ur7erb7vyv66vv\/\/\/\/8=",
    "cavvAlgorithm":"1",
    "eci":"05",
    "xid":"ODUzNTYzOTcwODU5NzY3Qw==",
    "directoryResponse":"Y",
    "authenticationResponse":"Y"
  },
  "reference":"YOUR_REFERENCE_NUMBER",
  "merchantAccount":"YOUR_MERCHANT_ACCOUNT"
}

Sample response

You will receive an Authorised resultCode if the payment authorisation was successful. Otherwise, see Result codes for a complete list of values and the actions that you need to take.

/authorise request
{
    "additionalData": {
        "liabilityShift": "true",
        "authCode": "76233",
        "avsResult": "4 AVS not supported for this card type",
        "threeDOffered": "true",
        "refusalReasonRaw": "AUTHORISED",
        "authorisationMid": "1000",
        "acquirerAccountCode": "TestPmmAcquirerAccount",
        "cvcResult": "1 Matches",
        "avsResultRaw": "4",
        "threeDAuthenticated": "true",
        "cvcResultRaw": "M",
        "acquirerCode": "TestPmmAcquirer",
        "acquirerReference": "7CAT290GCFV"
    },
    "pspReference": "8535505811653878",
    "resultCode": "Authorised",
    "authCode": "76233"
}