Sites WayDevelopers
Reference

Errors

Every error code the API returns, with its HTTP status.

Every error answers with the same object:

{ "error": { "code": "INVALID_REQUEST", "message": "…", "request_id": "…", "details": { } } }

Branch on code, never on message (wording may change). Quote request_id to support. details is present when there is more to say, for example the invalid fields.

CodeHTTP statusMeaning
INVALID_REQUEST400Invalid request
AUTHENTICATION_FAILED401Authentication failed
PERMISSION_DENIED403Permission denied
MERCHANT_NOT_ACTIVE403Merchant account is not active
NOT_FOUND404Resource not found
CONFLICT409Conflict
IDEMPOTENCY_CONFLICT422Idempotency key was reused with a different request
RATE_LIMITED429Too many requests
PAYLOAD_TOO_LARGE413Payload too large
INVALID_STATE_TRANSITION409Operation not allowed in the current state
REFUND_CAP_EXCEEDED422Refund amount exceeds the refundable balance
LEDGER_INVARIANT_VIOLATION500Internal ledger error
SETTLEMENT_INTEGRITY_VIOLATION422Settlement item does not match the batch
ATTEMPT_NOT_ALLOWED409A new payment attempt is not allowed in the current state
CAPTURE_POLICY_VIOLATION409Capture not allowed
VOID_NOT_APPLICABLE409This payment was never authorized at the provider; there is nothing to void
IMMUTABLE_RECORD409Record is immutable
PROVIDER_UNAVAILABLE502Payment provider unavailable
PROVIDER_TIMEOUT504Payment provider timed out
SERVICE_UNAVAILABLE503Service temporarily unavailable
INTERNAL_ERROR500Internal error