Error codes
Every refusal is a signed problem with a machine code, an HTTP status and a type link to its page here. Branch on the code — never on the title or detail, which are worded for people and change with the language you ask for.
The last column answers the first question to ask when an order is refused: did the purchase happen? This request bought nothing: fix the cause, then place a new order with a new operation id — but if you were resuming an order whose outcome was unknown, a refusal not marked Idempotency-Replayed says nothing about that order: keep resuming it. May still complete: send the same order again with the same operation id — never a new one, which could buy twice. Never returned when buying: the error only comes from other calls.
Keys and signatures
Anis could not accept how the call was signed.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Invalid credentials | invalid_credentials | 401 | This request bought nothing |
| Signature expired | signature_expired | 401 | This request bought nothing |
| Invalid content digest | invalid_content_digest | 400 | This request bought nothing |
| Replay detected | replay_detected | 409 | May still complete — resume with the same id |
Permissions and account
The call was signed correctly but is not allowed right now.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Source address not allowed | source_ip_not_allowed | 403 | This request bought nothing |
| Insufficient scope | insufficient_scope | 403 | This request bought nothing |
| Account not authorised | binding_not_authorized | 403 | This request bought nothing |
| Wallet disabled | wallet_disabled | 409 | This request bought nothing |
| Wallet expired | wallet_expired | 409 | This request bought nothing |
| Business subscription required | business_subscription_required | 409 | This request bought nothing |
| Account inactive | account_inactive | 403 | This request bought nothing |
The request itself
Something in the request does not exist or breaks a rule.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Not found | resource_not_found | 404 | This request bought nothing |
| Card not found | card_not_found | 404 | This request bought nothing |
| Wallet not granted | wallet_not_granted | 404 | This request bought nothing |
| Validation failed | validation_failed | 422 | This request bought nothing |
| Currency not supported | currency_not_supported | 422 | This request bought nothing |
Orders
Answers only a purchase can receive.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Operation id already used | idempotency_conflict | 409 | This request bought nothing |
| Order still processing | operation_processing | 202 | May still complete — resume with the same id |
| Allowed-debt consent required | allowed_debt_consent_required | 402 | This request bought nothing |
| Insufficient balance | insufficient_balance | 409 | This request bought nothing |
| Purchase not allowed | purchase_not_allowed | 403 | This request bought nothing |
| Order refused | purchase_not_allowed | 409 | This request bought nothing |
| Card unavailable | card_unavailable | 409 | This request bought nothing |
| Quantity unavailable | quantity_unavailable | 409 | This request bought nothing |
| Price changed | price_changed | 409 | This request bought nothing |
Limits
A limit on requests or on spending was reached.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Spending allowance used up | owner_limit_exceeded | 409 | This request bought nothing |
| Daily limit reached | daily_limit_exceeded | 429 | This request bought nothing |
| Rate limited | rate_limited | 429 | This request bought nothing |
Revealing cards
A card’s codes could not be shown.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Reveal not allowed | reveal_not_allowed | 409 | Never returned when buying |
| Invoice too large to reveal | invoice_reveal_limit_exceeded | 409 | Never returned when buying |
Enrolling a key
A step of turning an invitation into a working key was refused.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Invitation invalid | invitation_invalid | 401 | Never returned when buying |
| Challenge replaced | challenge_expired | 409 | Never returned when buying |
| Public key invalid | key_proof_invalid | 422 | Never returned when buying |
| Invitation already used | key_duplicate | 409 | Never returned when buying |
No decision reached
Anis could not finish the call. On an order, the outcome is unknown.
| Error | Code | Status | If this was an order |
|---|---|---|---|
| Service unavailable | dependency_unavailable | 503 | May still complete — resume with the same id |
| Request timeout | request_timeout | 504 | May still complete — resume with the same id |
| Internal error | internal_error | 500 | May still complete — resume with the same id |