Error codes

Every refusal is a problem with a machine code, an HTTP status and a type link to its page here. On a call whose answers Anis signs, the refusal is signed too — see Verifying answers. Branch on the code — never on the title or detail, which are worded for people and are always in English. Every code also has a page here in Arabic.

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_credentials401Bought nothing — an earlier copy may have: resume the same id
Signature expiredsignature_expired401Bought nothing — an earlier copy may have: resume the same id
Invalid content digestinvalid_content_digest400This request bought nothing
Malformed signed requestmalformed_signed_request400Bought nothing — an earlier copy may have: resume the same id
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_scope403Bought nothing — an earlier copy may have: resume the same id
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
Key not revocablekey_not_revocable409Never returned when buying
Address cannot be removednetwork_not_removable409Never returned when buying

The request itself

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

ErrorCodeStatusIf this was an order
Endpoint not verifiedwebhook_endpoint_unverified409Never returned when buying
Webhook URL refusedwebhook_endpoint_invalid422Never returned when buying
Recipient cannot be changed nowdirect_recharge_not_suspended409Never returned when buying
Amount outside limitsamount_out_of_range422Never returned when buying
Direct recharge product unavailabledirect_recharge_product_unavailable409Never returned when buying
Package unavailablepackage_unavailable409Never returned when buying
Meter refusedmeter_rejected422Never returned when buying
Not foundresource_not_found404This request bought nothing
Card not foundcard_not_found404This request bought nothing
Wallet not grantedwallet_not_granted404Bought nothing — an earlier copy may have: resume the same id
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_limited429May still complete — resume with the same id
Spending cap reachedspending_limit_exceeded429This request bought nothing
Address limit reachedpartner_network_limit_reached409Never returned when buying

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