Skip to main content

Point of Sale

For an in-person payments integration, see the most common raw responses that Terminal API returns. When a card scheme or issuer declines a transaction, they send us a raw response to explain why. This is also known as the “raw acquirer response”. The many raw responses are slightly different between schemes and are subject to change. For that reason, we map raw responses for failed transactions to a combination of a resultCode field with a value of Refused or Cancelled, and a refusalReason field explaining why the transaction did not succeed. If you want to receive the raw response in your API responses as well, you can enable that in your Customer Area. On this page, we describe the most common raw responses related to refused or canceled transactions. In the tables, Journal type refers to payment details in your Customer Area.

Requirements

Recommendations

Take the following recommendations into account with regard to handling raw responses.
  • The raw response provides additional information about why the transaction failed. Be aware that card schemes and issuers sometimes change the text without notice.
  • To prevent the malicious use of data, you must not expose the details of raw responses to shoppers.

Receive raw responses

If you want to receive the raw response for declined transactions:
  1. Log in to your Customer Area and switch to your merchant account.
  2. Go to Developers > Additional data.
  3. Select the Raw acquirer result checkbox.
  4. Select Save configuration.
When a payment request is declined, the additionalData of the response now includes:
  • refusalReasonRaw: the full raw response. For example: 51 : Insufficient funds/over credit limit.
  • refusalCodeRaw (only available for Visa and Mastercard transactions through our own acquiring platform): the numeric part of the raw response. For example: 51. This represents the underlying scenario that caused the transaction to fail.
{ "additionalData": { "avsResultRaw": "Y", "cvcResultRaw": "M", "refusalReasonRaw": "51 : Insufficient funds/over credit limit", "acquirerCode": "TestPmmAcquirer", "acquirerReference": "ACQUIRER_REFERENCE", ... } Tab: Example for Visa and Mastercard with own acquiring { "additionalData": { "avsResultRaw": "Y", "cvcResultRaw": "M", "refusalReasonRaw": "51 : Insufficient funds/over credit limit", "refusalCodeRaw": "51", "acquirerCode": "TestPmmAcquirer", "acquirerReference": "ACQUIRER_REFERENCE", ... }Note that we would map the raw response from this example to refusalReason Not enough balance and resultCode Refused.

Visa and Mastercard raw responses

These are the most common raw responses from Visa and Mastercard for refused or canceled transactions.If you use your own retry logic, you can use the raw response to help avoid Visa excessive retry fees. See Mapping to Visa system integrity fee categories.

Adyen for Platforms raw responses

Besides the issuer or card scheme, Adyen can also refuse a transaction if it fails a validation check in your balance platform.

Accel raw responses

These are the raw responses from Accel for refused or canceled transactions.

Afterpay raw responses

Alipay raw responses

AlipayHK raw responses

American Express raw responses

These are the most common raw responses from American Express for refused or canceled transactions.

BLIK raw responses

Diners raw responses

Discover raw responses

GoPay raw responses

Grabpay raw responses

Japanese issuer error codes

Error codes from Japanese issuers often provide more insight than acquirer responses. When shoppers in Japan encounter a payment error, it is common for them to call their issuer to retry the transaction. When the issuer provides an error, the additionalData object in the payment response contains the following fields:Example issuer response
We recommend you show the domesticShopperAdvice from the API response on your checkout page in Japan. This text is in the Shopper advice column below.The following are the most frequent error codes from domestic issuers.

KCP raw responses

Klarna raw responses

These are the most common raw acquirer responses from Klarna for successful, refused, failed or cancelled transactions.

Mastercard Merchant Advice Codes

The Merchant Advice Code (MAC) can be returned for both approved and refused Mastercard payments. This code provides additional information about the type of transaction or the reason why the payment failed. If the payment failed, the MAC gives guidance on if and when you can retry the payment.Not all Mastercard issuers return the MAC. When an issuer returns a MAC, you receive it automatically in the additionalData.merchantAdviceCode of the payment response. You do not need to enable specific additional data in your Customer Area in order to receive the MAC.

MB WAY raw responses

Mexico raw responses

These are the raw responses for refused or canceled domestics transactions in Mexico.

Nyce raw responses

These are the raw responses from Nyce for refused or canceled transactions.

Oney raw responses

Online banking Czech Republic raw responses

For a full list of responses, refer to PayU’s documentation.

Online banking Poland raw responses

Online banking Slovakia raw responses

For a full list of responses, refer to PayU’s documentation.

Pay by Bank (US) raw responses

Pay by Bank (US) relies on the ACH Direct Debit network for the funds flow. The raw refusal reasons reflect this.

PayPal raw responses

Adyen is moving PayPal transaction traffic away from an older PayPal API that is being deprecated, to a new PayPal API. You may notice a difference in the raw responses. The following tables show the most common raw acquirer responses from PayPal for refused, failed, or canceled transactions in the new situation, and in the old situation.These are the most common PayPal raw responses when your transaction traffic has been moved to the latest PayPal API:These are the most common PayPal raw responses when your transaction traffic is still on the older PayPal API:

Pix raw responses

Ratepay raw responses

Sepa Direct Debit raw responses

Star raw responses

These are the raw responses from Star for refused or canceled transactions.

Swish raw responses

TWINT raw responses

See also