Skip to content

Error Handling

All errors use the same JSON shape:

{
"error": {
"code": "NOT_FOUND",
"message": "payment 01927b3e-... not found"
}
}
CodeHTTPDescription
NOT_FOUND404Resource does not exist
INVALID_REQUEST400Malformed body or invalid parameter
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403Valid key but insufficient scope
MISSING_SCOPE403Key lacks the required scope
CONFLICT409Duplicate idempotency key with different payload
RATE_LIMITED429Too many requests
INSUFFICIENT_FUNDS400Ledger balance too low
IDEMPOTENCY_MISMATCH400Same key, different payload
INTERNAL500Server error — safe to retry
HTTP statusRetry?
400No — fix the request
401No — check your API key
403No — check scopes
404No — resource missing
409No — inspect the conflict
429Yes — use Retry-After header
500Yes — exponential backoff
502 / 503 / 504Yes — exponential backoff

If you get IDEMPOTENCY_MISMATCH (409), the key was already used with a different payload. Generate a new key for the new request — the original request may or may not have succeeded.