This page is for our classic Direct 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:
- Sign up for an Adyen test account at https://www.adyen.com/signup.
- Get your API Key. Save a copy as you'll need it for API calls you make to the Adyen payments platform.
- 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
To authorise a 3D Secure 1 authenticated payment, you need the following data:
authenticationResponse
: From thepaResponse
from the issuer's Access Control System.directoryResponse
: The enrollment response from theVERes
message from the Directory Server.cavv
: The authentication value for the 3D Secure authentication session. The returned value is a base64-encoded 20-byte array.cavvAlgorithm
: The CAVV Algorithm used during the authentication.xid
: The transaction identifier assigned by the Directory Server (base64 encoded, 20 bytes in a decoded form).eci
: The electronic commerce indicator.
To authorise a 3D Secure 2 authenticated payment, you need the following data:
authenticationValue
: The value for the 3D Secure 2 authentication session. The returned value is a Base64-encoded 20-byte array.dsTransID
: The unique transaction identifier assigned by the DS to identify a single transaction.eci
: The electronic commerce indicator.messageVersion
: The value should be 2.1.0.
Send a payment authorisation request with 3D Secure authentication data
Make a POST /authorise request and include mpiData
and additionalData
objects:
selectedBrand
: Set this value to the scheme that authenticated the payment. For example, if you are authorising for a co-branded Cartes Bancaires card, set it to eithervisa
orcartebancaire
depending on which scheme performed the authentication. If the brand is not specified, this can result in potential authorisation refusals for co-branded card products.-
mpiData
: Object that contains the authenticated data.For 3D Secure 1:
authenticationResponse
: From thepaResponse
from the issuer access control system.directoryResponse
: The enrollment response from theVERes
message from the directory server.cavv
: The authentication value for the 3D Secure authentication session. The returned value is a Base64-encoded 20-byte array.cavvAlgorithm
: The CAVV algorithm used during the authentication.xid
: The transaction identifier assigned by directory server (base64 encoded, 20 bytes in a decoded form).eci
: The electronic commerce indicator.
For 3D Secure 2:
cavv
: TheauthenticationValue
from your 3D Secure 2 provider.dsTransID
: The unique transaction identifier assigned by the DS to identify a single transaction.eci
: The electronic commerce indicator.
Sample request for 3D Secure 1
{
"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 request for 3D Secure 2
{
"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=",
"eci":"05",
"dsTransID":"c4e59ceb-a382-4d6a-bc87-385d591fa09d"
},
"reference":"YOUR_REFERENCE_NUMBER",
"merchantAccount":"YOUR_MERCHANT_ACCOUNT"
}
Response
You will receive an Authorised resultCode
if the payment authorisation was successful. Otherwise, see Result codes f or a complete list of values and the actions that you need to take.
{
"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"
}