Adyen Checkout

Overview

Gateway Website: https://www.adyen.com/
Developer Documentation: https://docs.adyen.com/api-explorer/Checkout/latest/overview
Default Currency: USD

Request Objects: BillingAddress, ShippingAddress, CreditCard, OrderInfo, SoftDescriptors, StoredCredentials, ThreeDSecure

Gateway Endpoints
This implementation of Adyen forwards requests to the below endpoints, defaulting to v69. To use a different version, send that version in the adyenApiVersion parameter (detailed in parameter chart below).

🚧

Adyen Checkout Live Endpoints

Production requests must include the livePrefix field (detailed in parameters). TokenEx uses this field to forward requests to the appropriate endpoints. This field is not necessary for the Test environment.

Supported Request Parameters

* denotes a required field

Field NameTypeAdyen MappingNotes
gatewaystringN/AAdyenDirect
username*stringUsername piece of Basic AuthYour Adyen User Name
Not required if "PrivateKey" is provided
password*stringPassword piece of Basic AuthYour Adyen Password
Not required if "PrivateKey" is provided
privateKey*stringx-api-key headerx-api-key from Adyen Portal
Not required if "UserName" & "Password" is provided
livePrefixstringlive endpoint prefixUse this field to pass the merchant-specific live endpoint prefix. https://docs.adyen.com/development-resources/live-endpoints#checkout-endpoints Required for Production
adyenApiVersionstringAdyen Checkout API versionDefaults to version 69. To change version, send target version as two digits. Example, "70".
skipAdyenRiskChecksbooleanriskData.skipRiskif true, instructs Adyen to skip risk checks for Authorize and Purchase requests.
merchantId*stringmerchantAccountThe merchant account identifier with which you want to process the transaction.
orderInfo.orderId*stringreferenceThe reference to uniquely identify a payment. If you need to provide multiple references for a transaction, separate them with hyphens ("-"). Maximum length: 80 characters.
orderInfo.customerIdstringadditionalData.enhancedSchemeData.customerReferenceCustomer code, if supplied by a customer. Required for Level 2 data.
orderInfo.shopperStatementstringshopperStatementWhat appears on the customer's statement. Adyen Docs
customerIpAddressstringshopperIpCustomers IP Address
amountnumericamount.valueThe amount in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. Required for Level 2 data.
currencyCodestringamount.currencyThe three-character ISO currency code. Alpha-3 ISO currency code

Use the ISO 4217 three-letter alphabetic code for the currency.
tax.amountnumericadditionalData.enhancedSchemeData.totalTaxAmountTotal tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. Required for Level 2 data.
creditCard.fullNamestringpaymentMethod.holderNameThe name of the cardholder, as printed on the card.
creditCard.numberstringpaymentMethod.numberCard number or TokenEx Token - TokenEx will replace the Token with the Detokenized number
creditCard.expMonthnumericpaymentMethod.expiryMonthThe customer’s credit card expiration month. Format: 2 digits, zero-padded for single digits. Example: 03 = March, 11 = November
creditCard.expYearnumericpaymentMethod.expiryYearThe customer’s credit card expiration year. Format: 4 digits. For example: 2030
creditCard.cvvstringpaymentMethod.cvcThe card verification code.
creditCard.brandstringpaymentMethod.brandThe brand of the customer's credit card.
billingAddress.address1stringbillingAddress.houseNumberOrNameThe number or name of the house.
billingAddress.address2stringbillingAddress.streetThe name of the street.
billingAddress.citystringbillingAddress.cityThe name of the city.
billingAddress.statestringbillingAddress.stateOrProvinceState or province codes as defined in ISO 3166-2. For example, CA in the US or ON in Canada.
billingAddress.zipstringbillingAddress.postalCodeA maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
billingAddress.countrystringbillingAddress.countryThree-Character Country Code ISO country code.
if provided, We convert this value to two-character country code.
In case this value is not sent with the billing address, it is auto-filled as "ZZ" as suggested by Adyen.
billingAddress.emailstringshopperEmailThe shopper's email address.
shippingAddress.address1stringdeliveryAddress.houseNumberOrNameThe number or name of the house.
shippingAddress.address2stringdeliveryAddress.streetThe name of the street.
shippingAddress.citystringdeliveryAddress.cityThe name of the city.
shippingAddress.statestringdeliveryAddress.stateOrProvinceState or province codes as defined in ISO 3166-2. For example, CA in the US or ON in Canada.
shippingAddress.zipstringdeliveryAddress.postalCode
additionalData.enhancedSchemeData.destinationPostalCode
A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
shippingAddress.countrystringdeliveryAddress.countryThree-Character Country Code ISO country code.
if provided, We convert this value to two-character country code.
In case this value is not sent with the shipping address, it is auto-filled as "ZZ" as suggested by Adyen.
threeDSecure.cavvstringmpiData.cavvThe cardholder authentication value
threeDSecure.authenticationResponsestringmpiData.authenticationResponseThis is the transStatus from the challenge result. If the transaction was frictionless, omit this parameter.
threeDSecure.directoryResponsestringmpiData.directoryResponseThis is the transStatus from the ARes or Authentication response.
threeDSecure.ecistringmpiData.eciThe electronic commerce indicator from the Authentication response.
threeDSecure.DSTransIdstringmpiData.dsTransIDThe unique transaction identifier assigned by the Directory Server (DS) from the Authentication or Challenge Results response.
threeDSecure.threeDSecureVersionstringmpiData.threeDSVersionThe EMV 3DS version used to authenticate the cardholder. Example, "2.1.0" or "2.2.0".
storedCredentials.initiatorstringN/Aunmapped
storedCredentials.credentialStoredbooleanshopperInteractionSee usage in The Basics - Stored Credentials. True = "ContAuth", False = "Ecommerce".
storedCredentials.previousNetworkTransactionIdstringadditionalData.networkTxReferenceSee usage in The Basics - Stored Credentials. Value obtained from Adyen response field additionalData.networkTxReference. This response field must be turned on from the Adyen portal -> Developers -> Additional Data -> Acquirer Section -> select Network Transaction Reference. Save configuration.
storedCredentials.TransactionTypestringrecurringProcessingModelValid values:
"recurring" = "CardOnFile",
"installment" = "Subscription",
"unscheduled" = "UnscheduledCardOnFile".
any other string value will be forwarded.
softDescriptors.merchantPhonestringshopperStatementSee note below.
softDescriptors.merchantUrlstringshopperStatementSee note below.
softDescriptors.merchantEmailstringshopperStatementSee note below.
softDescriptors.merchantNamestringshopperStatementSee note below.

📘

Soft Descriptors - ShopperStatement Construction

Adyen API's shopperStatement is a free-text field. If values are sent in the TokenEx SoftDescriptor fields, they will be concatenated and space separated in the forwarded request. Alternatively, use the shopperStatement passthrough in OrderInfo.

Example usage:

"softDescriptors": {  
    "merchantName":"Bob Smalls",  
    "merchantPhone": "(876) 613-1270 x38785",  
    "merchantEmail":"[email protected]",  
    "merchantUrl": "http://merchant.com"  
}

Forwarded output: Bob Smalls (876) 613-1270 x38785 [email protected] http://merchant.com

The value Adyen receives from ShopperStatement is visible within the Adyen merchant portal's description of that transaction's Shopper Details.

Example Requests

{
  "gateway": "AdyenDirect",
  "testMode": true,
  "merchantId": "<Your merchant account identifier>",
  "username": "<Your Adyen Username>",
  "password": "<Your Adyen Password>",
  "currencyCode": "USD",
  "amount": 150,
  "creditCard": {
    "brand": "MasterCard",
    "number": "5555341244441115",
    "expMonth": 12,
    "expYear": 2030,
    "fullName": "Fredrick Gulgowski",
    "cvv": "737"
  },
  "billingAddress": {
    "phone": "793-358-4413 x1584",
    "email": "[email protected]",
    "company": "Wolff, Durgan and Satterfield",
    "address1": "Suite 676",
    "address2": "175 Cassin Manors",
    "city": "Felipeshire",
    "state": "MT",
    "zip": "37685",
    "country": "USA"
  },
  "orderInfo": {
    "orderId": "ae34a289-1505-4c75-9ab1-a02490d6fc37"
  },
  "threeDSecure": {
    "authenticationResponse": "Y",
    "directoryResponse": "C",
    "threeDSecureVersion": "2.1.0",
    "eci": "02",
    "cavv": "3q2+78r+ur7erb7vyv66vv\\/\\/\\/\\/8=",
    "dsTransId": "76d5b612-ac0f-45a3-8166-3d5f99faf568"
  },
  "softDescriptors": {
    "merchantName": "Bob Smalls",
    "merchantPhone": "(876) 613-1270 x38785",
    "merchantEmail": "[email protected]",
    "merchantUrl": "http://merchant.com"
  },
  "storedCredentials": {
    "credentialStored": true,
    "transactionType": "installment",
    "previousNetworkTransactionId": "HKF5ISPDV0922"
  }
}
{
  "gateway": "AdyenDirect",
  "testMode": true,
  "merchantId": "<Your merchant account identifier>",
  "username": "<Your Adyen Username>",
  "password": "<Your Adyen Password>",
  "currencyCode": "USD",
  "tokenExTransactionCode": "V1c4TDQ3UzVKVjVYOE44Mg==",
  "amount": 150
}
{
  "gateway": "AdyenDirect",
  "testMode": true,
  "merchantId": "<Your merchant account identifier>",
  "username": "<Your Adyen Username>",
  "password": "<Your Adyen Password>",
  "tokenExTransactionCode": "V0dWRDQ0TkdWTUsyV044Mg=="
}

Gateway Response Parameters

Field NameTypeAdyen MappingNotes
ApprovedbooleanResultCode (Primary transactions)
Status (Secondary transactions)
True when the following conditions are met.
Primary Transactions: ResultCode is "authorised".
Secondary Transactions: Status is "received".
ApprovalCodestringadditionalData.authCodeAuthorisation code
ProviderTransactionCodestringpspReferenceAdyen's 16-character reference associated with the transaction/request.
TokenExTransactionCodestringpspReferenceBase64 encoded Adyen Checkout's pspReference. Required for use on secondary transactions.
NetworkTransactionIdstringadditionalData.networkTxReferenceReturned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa.

This contains either the Mastercard Trace ID or the Visa Transaction ID.
MerchantReferenceIdstringmerchantReference or referenceValue sent in request's OrderInfo.OrderId parameter
VerificationResult.CvvRawstringadditionalData.cvcResultRawThe CVV (card verification value) response returned by issuer.
VerificationResult.AvsRawstringadditionalData.AvsResultRawThe address verification service (AVS) response returned by issuer.
VerificationResult.ProviderParsed.CvvMatchstringadditionalData.cvcResultCVV match as parsed by Adyen
VerificationResult.ProviderParsed.AvsstringadditionalData.AvsResultAVS value as parsed by Adyen

Example Responses

{
    "gatewayResponse": {
        "rawResponse": "{\"additionalData\":{\"liabilityShift\":\"false\",\"authCode\":\"054713\",\"avsResult\":\"2 Neither postal code nor address match\",\"PaymentAccountReference\":\"zKOXz46ry95J4Z5HebXHLP4ipyDae\",\"threeDOffered\":\"false\",\"networkTxReference\":\"Q7GKE3IG51120\",\"refusalReasonRaw\":\"AUTHORISED\",\"expiryDate\":\"3\\/2030\",\"cvcResult\":\"5 Issuer not certified for CVC\\/CVV\",\"avsResultRaw\":\"2\",\"threeDAuthenticated\":\"false\",\"paymentMethod\":\"mc\",\"retry.attempt1.shopperInteraction\":\"Ecommerce\",\"cvcResultRaw\":\"U\",\"acquirerCode\":\"TestPmmAcquirer\",\"acquirerReference\":\"1-c62fbC1D3\"},\"pspReference\":\"PQ9522HF9HXXGN82\",\"resultCode\":\"Authorised\",\"amount\":{\"currency\":\"USD\",\"value\":13},\"merchantReference\":\"Zpm2k8s2we5nhg1u\",\"paymentMethod\":{\"brand\":\"mc\",\"type\":\"scheme\"}}",
        "gatewayErrors": [],
        "tokenExTransactionCode": "UFE5NTIySEY5SFhYR044Mg==",
        "approvalCode": "054713",
        "providerTransactionCode": "PQ9522HF9HXXGN82",
        "approved": true,
        "verificationResult": {
            "avsRaw": "2",
            "cvvRaw": "U",
            "providerParsed": {
                "cvvMatch": "5 Issuer not certified for CVC/CVV",
                "avs": "2 Neither postal code nor address match"
            }
        },
        "networkTransactionId": "Q7GKE3IG51120",
        "merchantReferenceId": "Zpm2k8s2we5nhg1u"
    },
    "referenceNumber": "23112010564922704876",
    "success": true,
    "error": "",
    "message": "",
    "thirdPartyStatusCode": "200"
}
{
    "gatewayResponse": {
        "rawResponse": "{\"additionalData\":{\"liabilityShift\":\"false\",\"authCode\":\"043383\",\"avsResult\":\"2 Neither postal code nor address match\",\"PaymentAccountReference\":\"1BZVvg7AiI8piUUPb1ZpJ7sB2VyXM\",\"threeDOffered\":\"false\",\"networkTxReference\":\"1F7XCJ1QM1120\",\"refusalReasonRaw\":\"AUTHORISED\",\"expiryDate\":\"3\\/2030\",\"cvcResult\":\"5 Issuer not certified for CVC\\/CVV\",\"avsResultRaw\":\"2\",\"threeDAuthenticated\":\"false\",\"paymentMethod\":\"mc\",\"retry.attempt1.shopperInteraction\":\"Ecommerce\",\"cvcResultRaw\":\"U\",\"acquirerCode\":\"TestPmmAcquirer\",\"acquirerReference\":\"F24GG4M84JH\"},\"pspReference\":\"JRR8KLPX6NK2WN82\",\"resultCode\":\"Authorised\",\"amount\":{\"currency\":\"USD\",\"value\":13},\"merchantReference\":\"Zpm2k8s2we5nhg1u\",\"paymentMethod\":{\"brand\":\"mc\",\"type\":\"scheme\"}}",
        "gatewayErrors": [],
        "tokenExTransactionCode": "SlJSOEtMUFg2TksyV044Mg==",
        "approvalCode": "043383",
        "providerTransactionCode": "JRR8KLPX6NK2WN82",
        "approved": true,
        "verificationResult": {
            "avsRaw": "2",
            "cvvRaw": "U",
            "providerParsed": {
                "cvvMatch": "5 Issuer not certified for CVC/CVV",
                "avs": "2 Neither postal code nor address match"
            }
        },
        "networkTransactionId": "1F7XCJ1QM1120",
        "merchantReferenceId": "Zpm2k8s2we5nhg1u"
    },
    "referenceNumber": "23112010584148827716",
    "success": true,
    "error": "",
    "message": "",
    "thirdPartyStatusCode": "200"
}
{
    "gatewayResponse": {
        "rawResponse": "{\"merchantAccount\":\"TokenExECOM\",\"paymentPspReference\":\"PQ9522HF9HXXGN82\",\"pspReference\":\"F3R6HQTMSV5X8N82\",\"reference\":\"PQ9522HF9HXXGN82\",\"status\":\"received\",\"amount\":{\"currency\":\"USD\",\"value\":13}}",
        "gatewayErrors": [],
        "tokenExTransactionCode": "RjNSNkhRVE1TVjVYOE44Mg==",
        "approvalCode": "",
        "providerTransactionCode": "F3R6HQTMSV5X8N82",
        "approved": true,
        "merchantReferenceId": "PQ9522HF9HXXGN82"
    },
    "referenceNumber": "23112010572476795207",
    "success": true,
    "error": "",
    "message": "",
    "thirdPartyStatusCode": "201"
}
{
    "gatewayResponse": {
        "rawResponse": "{\"merchantAccount\":\"TokenExECOM\",\"paymentPspReference\":\"JRR8KLPX6NK2WN82\",\"pspReference\":\"QZ8SJFGDCTGLNK82\",\"reference\":\"JRR8KLPX6NK2WN82\",\"status\":\"received\",\"amount\":{\"currency\":\"USD\",\"value\":13}}",
        "gatewayErrors": [],
        "tokenExTransactionCode": "UVo4U0pGR0RDVEdMTks4Mg==",
        "approvalCode": "",
        "providerTransactionCode": "QZ8SJFGDCTGLNK82",
        "approved": true,
        "merchantReferenceId": "JRR8KLPX6NK2WN82"
    },
    "referenceNumber": "23112010591299228642",
    "success": true,
    "error": "",
    "message": "",
    "thirdPartyStatusCode": "201"
}
{
    "gatewayResponse": {
        "rawResponse": "{\"merchantAccount\":\"TokenExECOM\",\"paymentPspReference\":\"J6N66C47Q3RZNN82\",\"pspReference\":\"KVGX56TLV8NKGK82\",\"reference\":\"J6N66C47Q3RZNN82\",\"status\":\"received\"}",
        "gatewayErrors": [],
        "tokenExTransactionCode": "S1ZHWDU2VExWOE5LR0s4Mg==",
        "approvalCode": "",
        "providerTransactionCode": "KVGX56TLV8NKGK82",
        "approved": true,
        "merchantReferenceId": "J6N66C47Q3RZNN82"
    },
    "referenceNumber": "23112011000552348816",
    "success": true,
    "error": "",
    "message": "",
    "thirdPartyStatusCode": "201"
}
{
    "gatewayResponse": {
        "rawResponse": "{\"status\":422,\"errorCode\":\"130\",\"message\":\"Required field 'reference' is not provided.\",\"errorType\":\"validation\",\"pspReference\":\"LC3SD679J7RPWJ65\"}",
        "gatewayErrors": [
            {
                "code": "130",
                "message": "Required field 'reference' is not provided.",
                "source": "Gateway"
            }
        ],
        "tokenExTransactionCode": "",
        "approvalCode": "",
        "providerTransactionCode": "LC3SD679J7RPWJ65",
        "approved": false
    },
    "referenceNumber": "23120816343252746474",
    "success": true,
    "error": "",
    "message": "",
    "thirdPartyStatusCode": "422"
}
{
    "gatewayResponse": {
        "rawResponse": "{\"additionalData\":{\"liabilityShift\":\"false\",\"avsResult\":\"2 Neither postal code nor address match\",\"PaymentAccountReference\":\"ztN0W0tsgj4jQPE4mA3evHpjgtVZm\",\"threeDOffered\":\"false\",\"networkTxReference\":\"SEB7MVSZI1208\",\"expiryDate\":\"3\/2030\",\"cvcResult\":\"5 Issuer not certified for CVC\/CVV\",\"avsResultRaw\":\"2\",\"threeDAuthenticated\":\"false\",\"paymentMethod\":\"mc\",\"retry.attempt1.shopperInteraction\":\"Ecommerce\",\"cvcResultRaw\":\"U\",\"acquirerCode\":\"TestPmmAcquirer\"},\"pspReference\":\"HL7BV8VMM75ZGN82\",\"refusalReason\":\"Acquirer Fraud\",\"resultCode\":\"Refused\",\"refusalReasonCode\":\"14\",\"merchantReference\":\"SlicedApplesBulk\"}",
        "gatewayErrors": [
            {
                "code": "14",
                "message": "Acquirer Fraud",
                "source": "Processor"
            }
        ],
        "tokenExTransactionCode": "",
        "approvalCode": "",
        "providerTransactionCode": "HL7BV8VMM75ZGN82",
        "approved": false,
        "verificationResult": {
            "avsRaw": "2",
            "cvvRaw": "U",
            "providerParsed": {
                "cvvMatch": "5 Issuer not certified for CVC/CVV",
                "avs": "2 Neither postal code nor address match"
            }
        },
        "networkTransactionId": "SEB7MVSZI1208",
        "merchantReferenceId": "SlicedApplesBulk"
    },
    "referenceNumber": "23120816363685560139",
    "success": true,
    "error": "",
    "message": "",
    "thirdPartyStatusCode": "200"
}