Skip to content
ChainPesaDocsTest mode
Dashboard

Get started

Errors

One error shape, with a stable code and a message you can show.

A failed request returns a non-2xx status and an error object. Branch on code; the message is written for people and may change.

Error response
{
  "error": {
    "code": "invalid_request",
    "message": "Insufficient USD balance. Add funds, or use Stable Connector so your customer funds this payout."
  }
}
StatusCodeMeaning
400invalid_requestA field is missing or wrong, or the request cannot be done. The message says which.
400invalid_jsonThe body is not a JSON object.
401unauthorizedThe key is missing, wrong, revoked, or used from an address it does not allow.
403forbiddenThe key lacks the scope this endpoint needs.
403live_disabledA live key was used. Live mode is not open yet.
403account_suspendedThe business account is suspended. Contact support.
404not_foundNo such object on your account.
413too_largeThe request body is larger than 20 kB.
429rate_limitedToo many requests. Wait for the Retry-After seconds.
502provider_errorOur payment partner could not answer. Safe to try again.

Retrying

Retry 429 and 5xx with a growing delay. Do not retry other 4xx errors without changing the request. For anything that creates money movement, retry with the same idempotency key.