Skip to content

Error model

Handled errors use the envelope below. Messages/details vary by endpoint; legacy middleware can return a simpler error or an empty response. Check HTTP status and parse defensively. These codes reflect payment initiation and setup handlers, not a universal provider error taxonomy.

Standard error response
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "currency is required",
    "details": {
      "field": "currency"
    }
  }
}

Common error codes

Common error codes
CodeMeaning
UNAUTHORIZEDInvalid app credentials, inactive app or authentication required
FORBIDDENThe authenticated actor cannot access this resource
VALIDATION_ERRORInvalid request payload or missing required fields
PAYMENT_NOT_FOUNDUnknown payment reference
PAYMENT_NOT_REFUNDABLEPayment cannot be refunded in current state
RATE_LIMIT_EXCEEDEDRequest rate exceeded, retry later
IDEMPOTENCY_PAYLOAD_MISMATCHIdempotency key reused with different payload
INITIATION_UNAVAILABLEReservation or saved response unavailable; preserve the same key
INTERNAL_ERRORRequest processing unavailable; preserve the original payment identity
WEBHOOK_TEST_FAILEDCheck the selected app’s HTTPS/signing configuration and recipient acknowledgement
SANDBOX_REQUIREDUse the sandbox environment for a measured first-payment trial

Handling guidance

  • For initiation timeouts, 429 or 5xx, retain the original key and payload. Correct authorization/validation before retrying; HTTP 202 is reserved execution, not permission to create another payment.
  • Do not retry validation or authorization failures without correction.
  • Log error.code and request correlation IDs for support escalation.