Search

Are you looking for test card numbers?

Would you like to contact support?

Developer-resource icon

Result code testing

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

Refer to the instructions for your type of integration:

Test result codes with the /payments endpoint

To force a card payment response:

  • Make a POST request to the /payments endpoint, specifying:

    • A paymentMethod object of type: scheme containing the fields required for a card payment. In the number and cvc fields, specify a test card number and corresponding CVC.

    • An additionalData object containing a RequestedTestAcquirerResponseCode element.
      In this element, provide either a Code (as an integer) or a Response (as a string) that you want to test from our list of Adyen response codes.

    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.

    The following example tests a "Refused" payment result due to an expired card:

    Sample /payments request

    { 
     "amount": {
       "currency": "USD",
       "value": 1000
     },
     "paymentMethod":{
       "type":"scheme",
       "expiryYear":"2020",
       "expiryMonth":"10",
       "cvc":"737",
       "number":"4444333322221111",
       "holderName":"J. De Tester"
     },
     "additionalData":{
       "RequestedTestAcquirerResponseCode":6
     },
     "reference":"ref213784568978023465896",
     "merchantAccount":"TestMerchant"
    }

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

    Sample /payments response

    {
     "additionalData": {
       "cardSummary": "1111",
       "paymentMethod": "visa"
     },
     "pspReference": "851563882585825A",
     "refusalReason": "Expired Card",
     "resultCode": "Refused",
     "refusalReasonCode": "6"     
    }

Test result codes with the /authorise endpoint

To force a card payment response:

  • Make a POST request to the /authorise endpoint, specifying:

    • A card object containing the fields required for a card payment. In the number and cvc fields, specify a test card number and corresponding CVC.

    • An additionalData object containing a RequestedTestAcquirerResponseCode element.
      In this element, provide either a Code (as an integer) or a Response (as a string) that you want to test from our list of Adyen response codes.

    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.

    The following example tests a "Refused" payment result due to an expired card:

    Sample /authorise request

    { 
     "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"
    }

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

    Sample /authorise response

    {
     "additionalData": {
       "cardSummary": "1111",
       "paymentMethod": "visa"
     },
     "pspReference": "851563882585825A",
     "refusalReason": "Expired Card",
     "resultCode": "Refused"
    }