Error Handling
All API errors return a consistent JSON structure.
{
"error": {
"code": "NOT_FOUND",
"message": "Payment not found",
"status": 404
}
}Error codes
HTTP status
Code
Description
400
BAD_REQUEST
Missing required field, invalid format, or missing merchant account
401
UNAUTHORIZED
Missing or invalid API key, account not activated, or user banned
403
FORBIDDEN
Insufficient scope, resource belongs to another merchant, or test/live mode mismatch
404
NOT_FOUND
Payment, product, or webhook not found
409
CONFLICT
Duplicate idempotency key with different parameters
422
UNPROCESSABLE_ENTITY
Validation error — e.g. unsupported token/network combination
429
RATE_LIMIT_EXCEEDED
Exceeded 100 requests per minute
500
INTERNAL_ERROR
Server error — contact support if persistent
Handling errors in code
For 429 errors, implement exponential backoff. Retrying immediately will not help and may extend your lockout window.
Last updated