request_id when contacting support.
Optional extra fields on some errors:
reason, note and suggestion (422), balance, required and currency (402).
Failures by endpoint
All endpoints except/ping can return 401 unauthorized, 403 account_disabled or ip_not_allowed, 429 and 5xx. Examples:
Retries
- Retry on a network error or timeout, on
429(waitRetry-After), on409 request_in_progress, and on any5xx. This includes a5xxwhose body is not JSON (for example a gateway error page): in that case check only the HTTP status. - If you sent an
Idempotency-Key(recommended), reuse the same key and the same email when retryingPOST /orders. You get the original order back and are never charged twice. Without a key we cannot tell a retry from a new request. - Use a growing delay between attempts (for example 1s, 2s, 4s, up to a few minutes) and stop after a reasonable number of tries.
- Do not retry unchanged other
4xxerrors: fix the request first.
