Errors
Failed requests return an HTTP status code and a single error object. Branch on the status code and on error.type; error.message is for people and may change.
Shape
400 Bad Requestjson
{
"error": {
"type": "invalid_request",
"message": "amount must be a positive integer in cents.",
"request_id": "0HN7KQ4F1V2C3:00000001"
}
}error.typestringStable category, see the table below
error.messagestringHuman-readable explanation. Server errors always say Unexpected error.
error.request_idstringSend it to support when you need help with a specific call
Types
invalid_request400Malformed JSON, missing or invalid field, amount above your per-charge limit, insufficient balance for a payout
authentication_failed401Missing or wrong client_id / api_key, or an invalid Armhed-Operation-Token
forbidden403Your IP is not in the allowlist, or the account is not approved for this operation
not_found404The charge or payout does not exist on your account
conflict409The identifier matches more than one payout, or the idempotency key is already being processed
rate_limited429Too many requests; slow down and retry
unavailable503The settlement route is temporarily down; retry later
server_error500Unexpected error on our side
Retrying safely
Send an Idempotency-Key header on every POST (it is required for payouts). Retrying with the same key never creates a second charge or payout: you get the original back. Retry on network errors, 429, 500 and 503 with growing delays; do not retry other 4xx without changing the request.