Skip to content

How do I read API errors?

Every failure has the same shape: a type, a stable code, a message, the field at fault and, for declines, a decline code.

Every error the API returns has the same parts:

  • Type: the broad kind of failure.
  • Code: a stable machine code in lower_case_with_underscores. Build your logic on it, not on the message.
  • Message: a fixed, readable explanation.
  • Field: the request field at fault, when there is one.
  • Decline code: for card declines, the reason the card was declined.

Each response also carries a request ID to find it in Developers → Logs.

What errors never contain

Errors never reveal another business's data, or whether a record exists in the other mode. Some decline reasons can't be shown to payers: show your customer a general message, and read the decline code yourself.

The full list of types and codes is in the API reference.

Still need help?

Tell us what happened, and our support team will help.

Search help articles

Find an answer in the Sovgate help center and jump straight to it.