CleonPay

Errors

Every error carries a stable machine code.

{
  "error": {
    "type": "invalid_request_error",
    "code": "method_requirements_not_met",
    "message": "The request does not satisfy iDEAL's requirements.",
    "details": [ ... ]
  }
}

Branch on code. The message is for humans and may be reworded.

StatusMeaningRetry?
400Malformed requestNo, fix it
401Bad or missing keyNo
402The bank refusedNo, try another method
404Not foundNo
409Idempotency conflictSee idempotency
422Valid JSON, impossible requestNo
429Rate limitedYes, after Retry-After
503Bank unreachableYes, with the same idempotency key

Common codes

CodeCause
method_requirements_not_metCurrency, country or a required field does not suit the method
method_not_enabledNot enabled on your account for that currency
refund_not_supportedThe scheme has no refund mechanism
payment_not_settledRefund attempted before settlement
refund_exceeds_balanceMore than the remaining refundable amount
cannot_cancelAlready authorised, refund instead