Errors

Every error has the same shape:

{
  "error": {
    "code": "insufficient_balance",
    "class": "client",
    "retriable": false,
    "message": "the balance does not cover this; nothing was moved",
    "detail": {"available": "12.5", "requested": "20"}
  }
}

Branch on code, never on the HTTP status. The same status can carry different codes: a 403 is forbidden_scope for your key and not_authorized_for_operation for the person named in the request.

A malformed field or query answers 422 validation_failed in the same envelope, with detail.fields naming each field and why.

Classes

classMeaningWhat to do
clientThe request was wrongDo not retry it unchanged, except where retriable is true (rate_limited, signature_expired)
serverWe failed, or our side is not readyRetry with backoff. Some of these need us to act first; the code says which
unresolvedWe do not know whether it happenedDo not retry. Read the resource, or wait for the event

unresolved exists because "not sent" and "maybe sent" are different states. Treating the second as the first is how a payment goes out twice.

Codes

CodeHTTPClassRetriableMessage
idempotency_key_required400clientnoIdempotency-Key is required on every POST
idempotency_key_too_long400clientnoIdempotency-Key is longer than we can store
idempotency_key_reused422clientnothis Idempotency-Key was used with a different request body
validation_failed422clientnothe request is invalid
unauthorized401clientnounknown or revoked key
forbidden_scope403clientnothis key does not carry the required scope
not_found404clientnono such resource
no_operation_for_key404clientnono committed record under this key
key_endpoint_unreadable403clientnokeys for this endpoint cannot be read here
signature_invalid401clientnothe request signature is not valid; nothing was done
signature_expired401clientyesthe request signature is too old or too new; sign it again
not_available_yet501clientnothis capability is not open yet
not_authorized_for_operation403clientnothe customer is not permitted to do this
held_for_review409clientnothe customer is under review; nothing was submitted
state_conflict409clientnothe resource is not in a state that permits this
tenant_mismatch403clientnothe request names a tenant other than this key's; nothing was recorded
rate_stale503serveryeswe have no current price for this pair right now
temporarily_halted503serveryesmoney is not moving right now while a discrepancy is looked at
insufficient_balance422clientnothe balance does not cover this; nothing was moved
no_verified_destination422clientnothere is no verified address to send this currency to; nothing was moved
daily_limit_exceeded422clientnothis would pass the daily withdrawal limit; nothing was moved
destination_not_allowed422clientnothis destination cannot be paid; nothing was moved
amount_above_limit422clientnothis amount is above the per-payout limit; nothing was moved
private_key_refused422clientnoa private key is never accepted; nothing was stored
invalid_xpub422clientnonot an account-level extended public key for this network
xpub_exists409clientnoa live key already derives on this network; retire it first
xpub_unavailable409clientnothis key cannot be used
xpub_range_overlap409clientnothe range overlaps a live key's range or indices already derived from this key
xpub_range_exhausted409clientnothe key's range has fewer addresses left than requested; nothing was derived
derived_address_unavailable409clientnoa derived address cannot be registered; nothing was derived
issuance_not_enabled409clientnothe Core is not issuing addresses on this network; nothing was issued
network_not_watched409clientnothe Core reads no asset on this network; nothing was issued
seed_not_verified409clientnothe Core's seed for this network has not been checked; nothing was issued
seed_range_exhausted409clientnothe seed's range has fewer addresses left than requested; nothing was issued
issuance_blocked409clientnotoo many indices of the Core's seed are already taken; nothing was issued
issuance_cap_reached429clientyesthis tenant has issued as many Core-held addresses today as the cap allows
issuance_failed409clientnoan address the seed derived could not be written; nothing was issued
rate_limited429clientyestoo many requests
internal_error500serveryessomething failed on our side
provider_unavailable503serveryesthe downstream provider is unreachable
network_not_enabled503serveryeschain payouts on this network are not enabled right now; nothing was moved
wallet_short503serveryesyour funds in the payout wallet do not cover this yet; nothing was moved
provider_not_configured503serveryesthis provider is not configured on our side
idempotency_key_in_progress409unresolvednoa request with this key is still running; poll the resource, do not retry
outcome_unknown502unresolvednothe request reached the provider and the outcome is not yet known; reconcile by reference, do not retry

Inside a batch of addresses, each refused item carries its own code: unsupported_network, invalid_address, invalid_reference, invalid_watch_from, address_registered, address_unavailable. See Deposit addresses.