Tools-2 icon

Testing result codes and refusal reasons

Test getting result codes and refusal reasons with your integration and troubleshoot issues before going live.

Test your in-person payments integration

See Simulating declined payments to learn about triggering refusal reasons with an in-person payments integration.

You can test how your integration can handle different responses to make sure your integration can handle failure scenarios. In such scenarios, you receive a result code and a refusal reason that tells you why a payment request did not succeed.

You can trigger specific refusal reasons in your payment requests to test how your integration handles failure scenarios.

Benefits of testing refusal reasons

This page describes how to trigger specific refusal reasons in your payment requests and test unhappy scenarios. There are several benefits to making sure your integration can handle unhappy flows, for example:

  • Presenting your shoppers with specific error messages per refusal reason.
  • Ensuring that you have a retry logic to handle refused payments.
  • Building your order management system logic to make sure unhappy scenarios are handled correctly.

Trigger a refusal reason in a payment request

To get a specific result code and refusal reason in the /payments response, you need to include a specific value either in the holderName or RequestedTestAcquirerResponseCode field. You can find the values to use in the Values for testing refusal reasons table.

  1. In the table, select the refusal reason that you want to trigger.

  2. Make a /payments request, setting either of the following fields to the value corresponding to the refusal reason you want to trigger:

    • paymentMethod.holderName

      Some card-related payment methods, for example Alipay, redirect you to a simulator where you can select the payment result. In this case, the value provided as the cardholder name will be ignored.

    • additionalData.RequestedTestAcquirerResponseCode

    For example, to test getting resultCode: Refused with refusalReason: ExpiredCard, make one of the following requests.

  3. Make sure that the response contains the resultCode and refusalReason you triggered, and that your integration handles the response as expected.

Values for testing refusal reasons

The following table provides the values you need to specify in your /payments to trigger specific refusal reasons in the response:

  • The refusalReason and resultCode columns indicate the responses you can trigger.
  • The holderName column provides the value to use if you want to trigger the response using the paymentMethod.holderName field.
  • The RequestedTestAcquirerResponseCode column provides the value to use if you want to trigger the response using the additionalData.RequestedTestAcquirerResponseCode field.
refusalReason
resultCode holderName RequestedTestAcquirerResponseCode
Unknown Error UNKNOWN 0
- Authorised APPROVED 1
Refused Refused DECLINED 2
Referral Refused REFERRAL 3
Acquirer Error Error ERROR 4
Blocked Card Refused BLOCK_CARD 5
Expired Card Refused CARD_EXPIRED 6
Invalid Amount Refused INVALID_AMOUNT 7
Invalid Card Number Refused INVALID_CARD_NUMBER 8
Issuer Unavailable Refused ISSUER_UNAVAILABLE 9
Not supported Refused NOT_SUPPORTED 10
3D Not Authenticated Refused NOT_3D_AUTHENTICATED 11
Not enough balance Refused NOT_ENOUGH_BALANCE 12
- Received PENDING 13
Acquirer Fraud Refused ACQUIRER_FRAUD 14
Cancelled Refused CANCELLED 15
Shopper Cancelled Refused SHOPPER_CANCELLED 16
Invalid Pin Refused INVALID_PIN 17
Pin tries exceeded Refused PIN_TRIES_EXCEEDED 18
Pin validation not possible Refused PIN_VALIDATION_NOT_POSSIBLE 19
FRAUD Refused FRAUD 20
Not Submitted Refused NOT_SUBMITTED 21
FRAUD-CANCELLED Cancelled FRAUD_CANCELLED 22
Transaction Not Permitted Refused TRANSACTION_NOT_PERMITTED 23
CVC Declined Refused CVC_DECLINED 24
Restricted Card Refused RESTRICTED_CARD 25
Revocation Of Auth Refused REVOCATION_OF_AUTH 26
Declined Non Generic Refused DECLINED_NON_GENERIC 27
Withdrawal amount exceeded Refused WITHDRAWAL_AMOUNT_EXCEEDED 28
Withdrawal count exceeded Refused WITHDRAWAL_COUNT_EXCEEDED 29
- Authorised PARTIALLY_APPROVED 30
Issuer Suspected Fraud Refused ISSUER_SUSPECTED_FRAUD 31
AVS Declined Refused AVS_DECLINED 32
Card requires online pin Refused PIN_REQUIRED 33
No checking account available on Card Refused NO_CHECKING_ACCOUNT_AVAILABLE_ON_CARD 34
No savings account available on Card Refused NO_SAVINGS_ACCOUNT_AVAILABLE_ON_CARD 35
Mobile PIN required Refused MOBILE_PIN_REQUIRED 36
Contactless fallback Refused CONTACTLESS_FALLBACK 37
Authentication required Refused AUTHENTICATION_REQUIRED 38
RReq not received from DS Refused RREQ_NOT_RECEIVED 39
Current AID is in Penalty Box. Refused BAN_CURRENT_AID 40
CVM Required Restart Payment Refused CVM_REQUIRED_RESTART_PAYMENT 41
3DS Authentication Error Refused THREED_SECURE_AUTHENTICATION_ERROR 42
Online PIN required Refused ONLINE_PIN_REQUIRED 43
Try another interface Refused TRY_ANOTHER_INTERFACE 44
Chip downgrade mode Refused CHIP_DOWNGRADE_MODE 45
Transaction blocked by Adyen to prevent excessive retry fees Refused ERPS_BLOCK 46

See also