Skip to main content

The Error Envelope

The API returns errors in exactly one shape — an error object with a stable machine-readable code and a human-readable message:
There are no other error shapes. No bare-string errors, no 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

Rate-limit headers accompany the response:
Self-hosted deployments tune the per-key limit with the RATE_LIMIT_PER_MINUTE environment variable (default 500/min).

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.