Errors

The API uses HTTP status codes to show whether a request worked. Codes in the 2xx range mean success, 4xx means something about the request needs fixing, and 5xx means something went wrong on our side.

Error body

Error responses have this JSON body:

{
  "messages": ["See errors"],
  "error_code": "VALIDATION_ERROR",
  "errors": ["amount must be greater than 0"]
}
FieldDescription
messagesAn array of human-readable messages. They're for logs and debugging; don't match on their text.
error_codeA stable code to branch on in your code.
errorsOnly on validation errors: the list of problems with the request.

For payment failures (declined cards and so on), see Failure messages.

Status codes

Statuserror_codeWhen it happensWhat to do
400PARAMETER_MISSINGA required parameter or the request body is missing.Fix the request.
403UNAUTHORIZEDThe API key is missing or invalid, or the endpoint isn't enabled for your account.Check the Authorization: Bearer <key> header and that you're using the right key for the environment (sandbox or production).
403ACCOUNT_BLOCKEDYour account is blocked.Check your dashboard or contact support.
403FEATURE_NOT_ENABLEDThe feature, for example international payouts, isn't enabled for your account.Contact support.
404RECORD_NOT_FOUNDNo record with that identifier exists on your account.Check the identifier.
422VALIDATION_ERRORThe request failed validation. Details are in errors.Fix the fields listed in errors.
422RECORD_NOT_UNIQUETwo requests with the same Idempotency-Key arrived at the same time. (Sending a key again later returns the original result instead of an error.)Retry with the same key to get the original result.
422UNPROCESSABLE_ENTITYThe request is valid but can't be carried out, for example refunding a disputed payment.Read messages; retrying the same request won't help.
422INSUFFICIENT_BALANCEYour balance doesn't cover the payout.Top up your balance, then retry.
429—You went over the rate limit. This response has no JSON body.Wait, then retry with backoff.
5xx—Something went wrong on our side.Retry GET requests with backoff. Before retrying a request that creates something, check whether it was created. If it keeps happening, contact support with the request details.
📘

An invalid or missing API key returns 403, not 401.