error is stable and machine-readable — branch on it. message is for humans and may change. details appears when there’s structured context. requestId matches the x-request-id header.
Validation errors add a details array naming each bad field:
Codes
Handling advice
- Treat
5xxand429as retryable with exponential backoff; everything4xxas a bug in the request or a business condition to surface. - For money-moving retries, always reuse the same
externalReference— see Idempotency. - Payment failures are not HTTP errors. A payout the provider rejects returns
201and later becomesstatus: "failed"with astatusMessage— watch the webhook.