API · How to read an error response

API v1

The issuer decline#

When the issuer declines a transaction, the response carries two fields:

codestring#

The issuer decline code.

descriptionstring#

The decline text.

An HTTP 200 does not mean success#

There is no defined standard for when the API responds HTTP 4xx and when it responds HTTP 200 with the error in the body. Both forms coexist, and there are four different error envelopes depending on the endpoint.

Practical consequence: your error handling must always look at the body, not only the status code, and tolerate more than one body shape.

How to write error handling#

  • Treat code and description as data to log and display, not as an enumeration to branch on.
  • Do not write if (status === 200) success. Check the body.
  • Store the raw response of every decline: it is what lets you reconstruct your merchant's decline pattern.
  • To determine the real state of a transaction after a failure, use safe retries.

Last verified: 2026-08-28 · Owner: equipo-integraciones

View as raw Markdown