All SandPay errors follow a single, stable format. No surprises, no ad-hoc shape depending on the endpoint.
error — machine-readable code, stable — use it in your logic (switch, if).
message — human-readable text, in English, subject to change.
detail — optional structured payload (per-field Zod errors, additional context).
The X-Request-Id header is included on every response (success and error alike). Keep it if you open a support ticket.
Codes by HTTP status
Retry strategy
The Node SDK raises a SandPayApiError that exposes status, code, message, detail, and requestId — use it to wire up your retry logic.
Example — handling a quota exceeded error