Error response format
Handling order
1
Inspect the HTTP status and typed SDK error class.
2
Read the custom
errorCode when present.3
Apply handling for that documented code.
4
Fall back to the HTTP status and message when no custom code is available.
5
Preserve the original status and code in structured logs, without logging credentials or sensitive request data.
SDK examples
- TypeScript / JavaScript
- Python
The SDK error carries
message, errorCode, status, and responseText.Retry safety
- Do not retry a known validation, permission, compliance, or insufficient-balance error unchanged.
- Retry
429and transient5xxresponses only with bounded backoff. See Status Codes for retry guidance by status.
Transaction error codes
Transaction endpoints return the following custom codes, typically with a 400 status. Use the Safe to retry? column to decide whether to fix the request, wait for an external change, or stop.Safe retries with externalId
Send a stable, uniqueexternalId for each logical payment and reuse the same value on every retry of that payment. externalId is unique per customer, so:
- If the transaction was never created, the retry creates it.
- If it was already created, the retry is safely rejected as a duplicate (A record with the same information already exists), so a second payment is impossible.