Concepts
Errors
One envelope for every failure, and which codes to retry.
{ "error": "insufficient_funds",
"code": "insufficient_funds",
"type": "invalid_request_error",
"message": "available 1200000, requested 5000000",
"param": "amount",
"request_id": "req_01J8…" }Branch on code. Quote request_id when reporting a problem.
| HTTP | type | Meaning | Retryable? |
|---|---|---|---|
| 400 | invalid_request_error | malformed / failed validation | no — fix the request |
| 401 | authentication_error | missing, malformed, expired or revoked key | no |
| 402 | invalid_request_error | insufficient_funds | yes, after a deposit |
| 403 | authentication_error | wrong_key_kind, missing_scope, IP allowlist, or signing_disabled — in that order | no |
| 404 | invalid_request_error | not found — also returned for another tenant's resource, so a 404 never confirms existence | no |
| 409 | idempotency_error | idempotency conflict or illegal state transition | see §5 |
| 422 | invalid_request_error | valid JSON, rejected by the chain (bad address, chain_not_enabled) | no |
| 429 | rate_limit_error | rate limit or quota | yes, after Retry-After |
| 503 | api_error | a dependency is down | yes, with backoff |
Notable codes: decimals_mismatch, chain_not_enabled, unknown_asset,
asset_disabled, invalid_address, self_payout_forbidden,
destination_not_allowlisted, quota_exceeded, too_many_pending_payouts,
payout_not_cancelable, signing_disabled.
Availability codes, all 422, all about a new address or payout (§4.2):
account_kind_disabled, chain_not_live_yet, chain_deposits_disabled,
asset_deposits_disabled, asset_payouts_disabled, chain_unavailable.