Errors

Errors

Errors return a JSON body with a detail message and a standard HTTP status code.

{ "detail": "merchant_txn_ref already used" }

Status codes

StatusMeaningWhat to do
400Invalid request — a field is missing or malformed.Fix the request body.
401Missing or invalid API key.Check the Authorization header and the key.
403The key lacks the required scope, or your merchant is suspended.Grant the scope, or resolve the suspension.
404The resource doesn't exist, or isn't yours.Check the id/reference.
409Duplicate reference — this operation already exists.Treat as success; don't retry blindly.
429Too many requests.Back off and retry.
5xxTemporary 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 409 on retry means the original succeeded.
  • Use exponential backoff for 429 and 5xx.
  • Log the detail message; 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.