Result code testing

Test how your integration handles responses from the Adyen payments platform by forcing specific payment response codes. 

Make an /authorise request, and include the required card fields (you can use one of the test card numbers with a CVC from this list). Also include an additionalData object containing a RequestedTestAcquirerResponseCode element. In this element, provide either a Code (as an integer) or Response (as a string) that you want to test from our list of Adyen response codes.

You'll receive a response containing a resultCode. If the payment is refused you'll also receive a refusalReason.

If you can't submit additionalData for testing, you can also test specific payment results using the card.holderName field. For more information, see Testing with card holder name.

Example

The following example shows how you test a "Refused" payment result due to an expired card:

{ "amount": {
    "currency": "USD",
    "value": 1000
  },
		
   "card":{
      "expiryYear":"2020",
      "expiryMonth":"10",
      "cvc":"737",
      "number":"4444333322221111",
      "holderName":"J. De Tester"
   },
   
   "additionalData":{
      "RequestedTestAcquirerResponseCode":6
   },
   "reference":"ref213784568978023465896",
   "merchantAccount":"TestMerchant"
}
{
   "pspReference":"8535240507440097",
   "refusalReason":"CARD_EXPIRED",
   "resultCode":"Refused"
}