Errors & status codes
Errors use conventional HTTP status codes and a consistent JSON body with a machine-readable code.
{
"error": {
"type": "compliance_error",
"code": "holder_not_verified",
"message": "The holder has not completed KYB.",
"param": "holder.kyb_id",
"request_id": "req_8sK2"
}
}
| HTTP | type | Example codes |
|---|---|---|
| 400 | invalid_request | parameter_missing, invalid_currency, amount_too_small |
| 401 | authentication_error | invalid_key, expired_token |
| 403 | permission_error | scope_missing, product_not_enabled |
| 404 | not_found | resource_missing |
| 409 | conflict | idempotency_mismatch, account_closed |
| 422 | compliance_error | holder_not_verified, restricted_industry, wallet_not_whitelisted |
| 429 | rate_limit | too_many_requests (Retry-After header) |
| 5xx | api_error | upstream_unavailable |
Handling errors
- Retry
429after the number of seconds inRetry-After, and5xxwith exponential backoff. Always reuse the sameIdempotency-Keywhen retrying a POST. - Do not retry
4xxerrors other than429without changing the request. - Include
request_idwhen contacting support.