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.

ErrorCodeStatusIf this was an order
Invalid credentialsinvalid_credentials401This request bought nothing
Signature expiredsignature_expired401This request bought nothing
Invalid content digestinvalid_content_digest400This request bought nothing
Replay detectedreplay_detected409May still complete — resume with the same id

Permissions and account

The call was signed correctly but is not allowed right now.

ErrorCodeStatusIf this was an order
Source address not allowedsource_ip_not_allowed403This request bought nothing
Insufficient scopeinsufficient_scope403This request bought nothing
Account not authorisedbinding_not_authorized403This request bought nothing
Wallet disabledwallet_disabled409This request bought nothing
Wallet expiredwallet_expired409This request bought nothing
Business subscription requiredbusiness_subscription_required409This request bought nothing
Account inactiveaccount_inactive403This request bought nothing

The request itself

Something in the request does not exist or breaks a rule.

ErrorCodeStatusIf this was an order
Not foundresource_not_found404This request bought nothing
Card not foundcard_not_found404This request bought nothing
Wallet not grantedwallet_not_granted404This request bought nothing
Validation failedvalidation_failed422This request bought nothing
Currency not supportedcurrency_not_supported422This request bought nothing

Orders

Answers only a purchase can receive.

ErrorCodeStatusIf this was an order
Operation id already usedidempotency_conflict409This request bought nothing
Order still processingoperation_processing202May still complete — resume with the same id
Allowed-debt consent requiredallowed_debt_consent_required402This request bought nothing
Insufficient balanceinsufficient_balance409This request bought nothing
Purchase not allowedpurchase_not_allowed403This request bought nothing
Order refusedpurchase_not_allowed409This request bought nothing
Card unavailablecard_unavailable409This request bought nothing
Quantity unavailablequantity_unavailable409This request bought nothing
Price changedprice_changed409This request bought nothing

Limits

A limit on requests or on spending was reached.

ErrorCodeStatusIf this was an order
Spending allowance used upowner_limit_exceeded409This request bought nothing
Daily limit reacheddaily_limit_exceeded429This request bought nothing
Rate limitedrate_limited429This request bought nothing

Revealing cards

A card’s codes could not be shown.

ErrorCodeStatusIf this was an order
Reveal not allowedreveal_not_allowed409Never returned when buying
Invoice too large to revealinvoice_reveal_limit_exceeded409Never returned when buying

Enrolling a key

A step of turning an invitation into a working key was refused.

ErrorCodeStatusIf this was an order
Invitation invalidinvitation_invalid401Never returned when buying
Challenge replacedchallenge_expired409Never returned when buying
Public key invalidkey_proof_invalid422Never returned when buying
Invitation already usedkey_duplicate409Never returned when buying

No decision reached

Anis could not finish the call. On an order, the outcome is unknown.

ErrorCodeStatusIf this was an order
Service unavailabledependency_unavailable503May still complete — resume with the same id
Request timeoutrequest_timeout504May still complete — resume with the same id
Internal errorinternal_error500May still complete — resume with the same id