OuiPay
Errors

API Error Codes

Every error code, its HTTP status, and what to do about it.

All errors use the envelope {"error": {"code", "message", "request_id"}}. Branch on code: message is for humans.

Authentication and authorization

CodeHTTPMeaningYour action
UNAUTHENTICATED401Missing/invalid/revoked keyFix the key
FORBIDDEN403Valid key, disallowed scope or IPCheck scope/IP allowlist
ACCOUNT_SUSPENDED403Account suspended by operationsContact support
PIN_REQUIRED403Transaction PIN step-up neededPrompt for PIN

Validation and state

CodeHTTPMeaningYour action
VALIDATION400Field validation failedFix the request
NOT_FOUND404Resource does not existCheck the id
DUPLICATE409Unique constraint conflictReuse existing resource
CONFLICT409Invalid state transitionCheck current status
IDEMPOTENCY_REPLAY409Key reused with different payloadDo not mutate on retry

Business rules (422)

CodeMeaningYour action
INSUFFICIENT_FUNDSWallet cannot cover amount + feePrompt for funding/lower amount
LIMIT_EXCEEDEDAbove the customer's tier limitPrompt for KYC upgrade
COMPLIANCE_DENIEDScreening blocked the operationUnrecoverable: do not retry
METHOD_NOT_SELECTABLEMethod not enabled for customerRe-resolve /payments/methods
FEATURE_DISABLEDOperation under maintenanceSurface maintenance, retry later

Rate limits and infrastructure

CodeHTTPMeaningYour action
RATE_LIMITED429Quota exceededBack off, retry later
PROVIDER_ERROR502Upstream provider failedRetry-safe via idempotency
INTERNAL500OuiPay internal errorRetry; quote request_id

failure.code vs error.code

Both are machine-readable, but on different surfaces:

  • error.code: the HTTP response's reason (this page)
  • failure.code: the transaction's recorded failure reason, visible on GET /v1/transactions/{id} and failed webhook events

A rejected request produces both: an HTTP error now and a failed transaction entry carrying failure.code + failure.stage.

On this page