Errors
Errors return a JSON body with a detail message and a standard HTTP status
code.
{ "detail": "merchant_txn_ref already used" }Status codes
| Status | Meaning | What to do |
|---|---|---|
400 | Invalid request — a field is missing or malformed. | Fix the request body. |
401 | Missing or invalid API key. | Check the Authorization header and the key. |
403 | The key lacks the required scope, or your merchant is suspended. | Grant the scope, or resolve the suspension. |
404 | The resource doesn't exist, or isn't yours. | Check the id/reference. |
409 | Duplicate reference — this operation already exists. | Treat as success; don't retry blindly. |
429 | Too many requests. | Back off and retry. |
5xx | Temporary problem on our side or an upstream provider. | Retry with backoff; the reference keeps it idempotent. |
Handling them well
- Retries are safe when you reuse the same reference — see
idempotency. A
409on retry means the original succeeded. - Use exponential backoff for
429and5xx. - Log the
detailmessage; it's meant to be actionable.
A 403 that mentions suspension means your merchant account is temporarily
blocked from write operations. Read endpoints (balances, statements, listings)
keep working — contact your account manager to reactivate.