Skip to main content
Errors use an HTTP status code and a JSON body.
Branch on error_code, not on error_message: the text is not part of the contract. Common codes: VALIDATION, UNAUTHORIZED, FORBIDDEN, PERMISSION_DENIED, NOT_FOUND, CONFLICT, INSUFFICIENT_FUNDS, INVALID_2FA, RATE_LIMITED, API_ACCESS_DISABLED.
Log the HTTP status, request id if present, endpoint, and sanitized request metadata. Do not log API keys, tokens, full card data, or customer secrets.