Error codes

Every error response is JSON with a stable machine-readable error code. Branch on the code, never on the human-readable text.

CodeHTTP statusMeaning
invalid_request400The request body or parameters failed validation.
idempotency_key_required400A money-moving request was sent without an Idempotency-Key header.
unsupported_grant_type400The grant_type was not client_credentials (only client-credentials grants are supported).
client_certificate_required401No mTLS client certificate was presented on the connection.
invalid_client401The client_id/client_secret pair is unknown, revoked, or wrong for this environment.
invalid_token401The bearer token is missing, expired, malformed, or not bound to the presented certificate.
invalid_signature401The detached JWS signature does not verify against your registered signing key.
stale_timestamp401The X-Timestamp header is outside the ±300-second acceptance window.
replayed_nonce401The X-Nonce value has already been used by this client.
signing_key_not_registered401No ES256 signing public key is registered for this client.
ip_not_allowed403The request originated from an IP address outside your registered allowlist.
quote_not_found404The referenced quote_id does not exist for this partner.
order_not_found404The referenced order does not exist for this partner.
withdrawal_not_found404The referenced withdrawal does not exist for this partner.
account_not_provisioned404No funding account has been provisioned for this partner yet.
quote_already_used409The quote has already been executed by a previous order.
quote_expired409The 60-second quote validity window has passed; request a new quote.
insufficient_funds409The SAR balance is too low to cover the buy order or withdrawal.
insufficient_gold409The gold holdings are too low to cover the sell order.
idempotency_key_conflict409The Idempotency-Key was already used with different request parameters.
settlement_iban_not_configured409No settlement IBAN is registered, so withdrawals cannot be requested.
rate_limited429You exceeded your per-minute rate limit; retry after the Retry-After header.
execution_failed502Order execution failed downstream; the order is recorded as failed and embedded in the response, and an order.failed webhook is sent.
price_unavailable503No fresh gold price is available right now; retry shortly.