Testing Declines & Error Responses

There are a number of ways in which your payment request could fail:

  • fails basic API validation
  • rejected/failed internally to Exact Payments Gateway
  • rejected/failed by your processor

API Failures

These are straightforward and will result in a status code of 400 and an array of error strings. You can generate these by sending invalid values for any attributes. For example, all amounts in our APIs are expected to be in cents, so submitted a dollar amount amount: 50.12 will be rejected with a payload of...

{
  "messages": [
    "Amount must be an integer"
  ]
}

Gateway Failures

Submitting test transaction with penny amounts will trigger a variety of Gateway Responses where the desired response code is appended to 5000.00. For example, submitting a test transaction with an amount of 5000.42 returns a Gateway Response 'Unable to Send Transaction' (error code 42).

{
  "messages": [
    "Unable to Send Transaction"
  ]
}

Consult Gateway Response Codes for more details on possible response codes.

Processor Failures

The bank response codes generated will depend on your processor, so please consult Bank Response Codes for more details.

Fiserv Response Codes

Submitting test transactions with amounts between 5000.00 - 5999.00 will trigger a variety of Fiserv Bank Responses. The desired decline response code (301 - 997) is appended to a default value of $5000. For example, submitting a test transaction with an amount of $5301.00 returns a 301 decline response (Issuer Unavailable).

{
  ...
  "sent_to_bank": true,
  "bank_response": {
    "code": "301",
    "message": "Issuer unavailable"
  },
  ...
}
Elavon Response Codes

Submitting test transactions with amounts between 5200.00 - 5999.00 will trigger a an Elavon Response of "ND"

{
  ...
  "sent_to_bank": true,
  "bank_response": {
    "code": "ND",
    "message": "Declined"
  },
  ...
}

Note: when using our Payments API, all amounts must be sent as cents, so, to elicit a 301 (Issuer Unavailable) Fiserv bank response for example, you would send an amount of 530100.