Skip to main content
All API errors have the same shape, regardless of the resource or the endpoint. This makes your integration predictable: you parse the error response once and reuse it across the entire API.

Uniform structure

string
Stable, machine-readable code. Use it to branch your error-handling logic (do not parse the message).
string
Human-readable message. It may change over time: do not use it to make decisions in your code.
array
May come in validation errors (400 INVALID_REQUEST): a list of { field, issue } that indicates which field failed and why. In the batch mode of POST /v2/debts each entry also carries the index and externalRequestId of the failing item, and in POST /debts/cancel, the index. Malformed JSON returns [{ "field": "body", "issue": "Invalid JSON syntax" }]. Not every 400 carries it: when it is missing, the message says what failed.
string
Unique identifier of the request. Share it with support to trace exactly what happened.

Catalog of codes

RESOLUTION_ERROR without companyCode indicates that the organization associated with your token is not properly configured in the system. If you see it persistently, contact support with the requestId.

API Gateway errors (401 and 403)

401 and 403 are issued by the API Gateway, before the request reaches the API, and do not use the uniform structure: they carry no error object and no requestId. The only exception is the 403 RESOLUTION_ERROR of payment orders, which does have the error envelope.
In the 403 for an invalid token or a token without permission the field is capitalized (Message). The API Gateway checks the token first: without a token it returns 401 even if the x-api-key is also missing. If your code reads the error, handle both shapes: the API’s error envelope and the gateway’s plain object. More detail in Authentication.

The message is informational

The text of error.message is useful for debugging, but it is not a contract: it can change without notice. To decide what to do, use error.code and, when a validation error carries it, error.details[].field. The message examples in these guides are illustrative.

Recommendations

Branch by code

Decide your logic with error.code, never with the text of message.

Save the requestId

Log the requestId in your logs: it is the fastest way for support to trace a request.

Retry with idempotency

On 429 or 500, retry with the same Idempotency-Key (or the same externalRequestId) to avoid duplicates. After the retry, read the resource to confirm its status.

Validate before sending

If a 400 carries error.details, use it to show your users which field to fix.