Errors

Errors return JSON with a human-readable message and a stable machine-readable code:

{
  "message": "An active subscription is required to use the payment API.",
  "code":    "subscription_required"
}

Validation errors also include an errors object keyed by field name:

{
  "message": "The amount field is required.",
  "code":    "validation_error",
  "errors": {
    "amount": ["The amount field is required."]
  }
}

Error codes

HTTP Code Meaning
401authentication_errorMissing, invalid, revoked, or expired API key.
402subscription_requiredNo active subscription.
402transaction_limit_reachedMonthly plan transaction limit used up.
403merchant_suspendedAccount suspended — contact support.
403ability_deniedThe API key does not have the required ability for this endpoint (see API keys).
403website_not_allowedBrowser request blocked — no websites are registered, or this origin is not in your registered websites.
404http_errorUnknown payment reference (or owned by another merchant).
409duplicate_invoice_numberA payment already exists for this invoice_number and hasn't failed or expired — see Idempotency.
422validation_errorValidation failed; see the errors object.
429http_errorRate limited (120 requests/minute per key).

Payment failure reasons

Failed payments carry a failure_reason: duplicate_trx_id (the TrxID was already used to verify another payment) or rejected_by_admin (manually rejected after review).