The Error Envelope
The API returns errors in exactly one shape — anerror object with a
stable machine-readable code and a human-readable message:
type or
param fields — every 4xx/5xx response from every endpoint carries this
envelope.
code values are stable snake_case identifiers — branch on them in your
integration. message is for humans and may change without notice; never
parse it.Error Codes
Domain-specific codes
Some money-handling endpoints return more specific codes so callers can react precisely:Examples
Validation failure
Invalid API key
Over-refund guard
Rate limited
HTTP Status Codes
Handling Errors
Check the HTTP status code and parse the envelope:Retry Logic
Recommended retry strategy by status:
Use an idempotency key when retrying mutating
requests so a retry can never double-charge or double-create.