# Response Codes
source: https://developer.mastercard.com/mastercard-gateway/documentation/testing/response-code/index.md

Integrations with Payment Client and Virtual Payment Client return response codes unlike the enumerations returned for API. The tables show the mapping between the two types of responses returned by Mastercard Gateway.

## Transaction response codes {#transaction-response-codes}

|                                                                                               Payment Client / Virtual Payment Client                                                                                                ||                                                                                             API                                                                                             ||
| Response Code |                                                                                                      Description                                                                                                      |     response.gatewayCode      |                                                                         Description                                                                          |
|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0             | Transaction Successful                                                                                                                                                                                                | APPROVED                      | Transaction Approved                                                                                                                                         |
| 1             | Transaction could not be processed                                                                                                                                                                                    | UNSPECIFIED_FAILURE           | Transaction could not be processed                                                                                                                           |
| 2             | Transaction Declined - Contact Issuing Bank                                                                                                                                                                           | DECLINED                      | The requested operation was not successful. For example, a payment was declined by issuer or payer authentication was not able to be successfully completed. |
| 3             | Transaction Declined - No reply from Bank                                                                                                                                                                             | TIMED_OUT                     | Response timed out                                                                                                                                           |
| 4             | Transaction Declined - Expired Card                                                                                                                                                                                   | EXPIRED_CARD                  | Transaction declined due to expired card                                                                                                                     |
| 5             | Transaction Declined - Insufficient Credit                                                                                                                                                                            | INSUFFICIENT_FUNDS            | Transaction declined due to insufficient funds                                                                                                               |
| 6             | Transaction Declined - Bank system error                                                                                                                                                                              | ACQUIRER_SYSTEM_ERROR         | Acquirer system error occurred processing the transaction                                                                                                    |
| 7             | Payment Server Processing Error. Typically caused by invalid input data such as a credit card number. Processing errors can also occur.                                                                               | SYSTEM_ERROR                  | Internal system error occurred processing the transaction                                                                                                    |
| 8             | Transaction Declined - Transaction Type not supported                                                                                                                                                                 | NOT_SUPPORTED                 | Transaction type not supported                                                                                                                               |
| 9             | Bank Declined Transaction (Do not contact Bank)                                                                                                                                                                       | DECLINED_DO_NOT_CONTACT       | Transaction declined - do not contact issuer                                                                                                                 |
| A             | Transaction Aborted                                                                                                                                                                                                   | ABORTED                       | Transaction aborted by card holder                                                                                                                           |
| B             | Transaction Blocked - Returned when: - the Verification Security Level has a value of '07', - The merchant has 3D-Secure blocking enabled, - the overall risk assessment result returns a 'Reject' or 'System Reject' | BLOCKED                       | Transaction blocked due to Risk or 3D Secure blocking rules                                                                                                  |
| C             | Transaction Cancelled                                                                                                                                                                                                 | CANCELLED                     | Transaction cancelled by card holder                                                                                                                         |
| D             | Deferred Transaction                                                                                                                                                                                                  | DEFERRED_TRANSACTION_RECEIVED | Deferred transaction received and awaiting processing                                                                                                        |
| E             | Transaction Declined - Refer to card issuer                                                                                                                                                                           | REFERRED                      | Transaction declined - refer to issuer                                                                                                                       |
| F             | 3D Secure Authentication Failed                                                                                                                                                                                       | AUTHENTICATION_FAILED         | 3D Secure authentication failed                                                                                                                              |
| I             | Card Security Code Failed                                                                                                                                                                                             | INVALID_CSC                   | Invalid card security code                                                                                                                                   |
| L             | Shopping Transaction Locked. This indicates that there is another transaction taking place using the same shopping transaction number.                                                                                | LOCK_FAILURE                  | Order locked - another transaction is in progress for this order                                                                                             |
| M             | Transaction Submitted (the transaction has been directed to the acquirer, but the Payment Server has not yet received it to complete the transaction)                                                                 | SUBMITTED                     | Transaction submitted - response has not yet been received                                                                                                   |
| N             | Cardholder not enrolled in 3DSecure (authentication only)                                                                                                                                                             | NOT_ENROLLED_3D_SECURE        | Card holder is not enrolled in 3D Secure                                                                                                                     |
| P             | Transaction is Pending                                                                                                                                                                                                | PENDING                       | Transaction is pending                                                                                                                                       |
| R             | Retry Limits Exceeded, Transaction Not Processed                                                                                                                                                                      | EXCEEDED_RETRY_LIMIT          | Transaction retry limit exceeded                                                                                                                             |
| S             | Transaction Declined - Duplicate Batch                                                                                                                                                                                | DUPLICATE_BATCH               | Transaction declined due to duplicate batch                                                                                                                  |
| T             | Address Verification Failed                                                                                                                                                                                           | DECLINED_AVS                  | Transaction declined due to address verification                                                                                                             |
| U             | Card Security Code Failed                                                                                                                                                                                             | DECLINED_CSC                  | Transaction declined due to card security code                                                                                                               |
| V             | Address Verification and Card Security Code Failed                                                                                                                                                                    | DECLINED_AVS_CSC              | Transaction declined due to address verification and card security code                                                                                      |
| W             | Transaction Declined - Payment Plan not supported.                                                                                                                                                                    | DECLINED_PAYMENT_PLAN         | Transaction declined due to payment plan                                                                                                                     |
| X             | Approved pending settlement - Approved by a batch settlement system, but still awaiting further details from the acquirer.                                                                                            | APPROVED_PENDING_SETTLEMENT   | Transaction Approved - pending batch settlement                                                                                                              |
| ?             | Response unknown                                                                                                                                                                                                      | UNKNOWN                       | Response unknown                                                                                                                                             |

## Address Verification Service (AVS) response codes {#address-verification-service-avs-response-codes}

|                                           Payment Client / Virtual Payment Client                                            ||                                                           API                                                            ||
| Response Code |                                                  Description                                                  | response.cardholderVerification.avs.gatewayCode |                               Description                               |
|---------------|---------------------------------------------------------------------------------------------------------------|-------------------------------------------------|-------------------------------------------------------------------------|
| X             | Exact match -- address and 9-digit ZIP/postal code                                                            | ADDRESS_ZIP_MATCH                               | Street address and zip/postcode were matched                            |
| Y             | Exact match -- address and 5-digit ZIP/postal code                                                            |                                                 |                                                                         |
| D             | Street Address and postal code match for international transaction.                                           |                                                 |                                                                         |
| M             | Street Address and postal code match for international transaction.                                           |                                                 |                                                                         |
| F             | Street address and postal code match. Applies to U.K. only.                                                   |                                                 |                                                                         |
| W             | 9-digit ZIP/postal code matched; Address not Matched                                                          | ZIP_MATCH                                       | Zip/postcode matched. Street address not matched                        |
| P             | Postal Codes match for international transaction but street address not verified due to incompatible formats. |                                                 |                                                                         |
| Z             | 5-digit ZIP/postal code matched; Address not Matched                                                          |                                                 |                                                                         |
| A             | Address match only                                                                                            | ADDRESS_MATCH                                   | Street address matched                                                  |
| B             | Street Address match for international transaction. Postal Code not verified due to incompatible formats.     |                                                 |                                                                         |
| S             | Service currently not supported.                                                                              | SERVICE_NOT_SUPPORTED                           | Service currently not supported by acquirer or merchant                 |
| G             | International transaction, address information unavailable.                                                   | NOT_VERIFIED                                    | AVS could not be verified for an international transaction              |
| C             | Street Address and Postal Code not verified for International Transaction due to incompatible formats.        |                                                 |                                                                         |
| I             | Visa Only. Address information not verified for international transaction.                                    |                                                 |                                                                         |
| R             | Issuer system is unavailable. Retry.                                                                          | SERVICE_NOT_AVAILABLE_RETRY                     | Issuer system is unavailable. Retry can be attempted                    |
| U             | Address unavailable, no data from Issuer.                                                                     | NOT_AVAILABLE                                   | No data available from issuer or AVS data not supported for transaction |
| E             | Not a mailphone order.                                                                                        |                                                 |                                                                         |
| N             | Address and ZIP/postal code not matched                                                                       | NO_MATCH                                        | No match                                                                |
| 0 (Zero)      | No AVS requested. (Used by VisaII.)                                                                           | NOT_REQUESTED                                   | AVS not requested                                                       |
| K             | Card holder name only matches.                                                                                | NAME_MATCH                                      | Card holder name matched                                                |
| O             | Card holder name and address matches                                                                          | NAME_ADDRESS_MATCH                              | Card holder name and address matched                                    |
| L             | Card holder name and zip/postcode matches                                                                     | NAME_ZIP_MATCH                                  | Card holder name and zip/postcode matched                               |

## Card Security Code (CSC) response codes {#card-security-code-csc-response-codes}

|             Payment Client / Virtual Payment Client             ||                                           API                                           ||
| Response Code |                   Description                    | response.cardSecurityCode.gatewayCode |                   Description                    |
|---------------|--------------------------------------------------|---------------------------------------|--------------------------------------------------|
| M             | Valid or matched CSC                             | MATCHED                               | Valid or matched                                 |
| S             | Merchant indicates CSC does not present on card. | NOT_PRESENT                           | Merchant indicated CSC does not present on card. |
| P             | CSC Not Processed                                | NOT_PROCESSED                         | Not processed                                    |
| U             | Card Issuer is not registered and/or certified.  | NOT_SUPPPORTED                        | Card Issuer is not registered and/or certified.  |
| N             | Code invalid or not matched                      | NO_MATCH                              | Invalid or not matched                           |

