Errors
Errors use standard HTTP status codes and a JSON body:
{ "error": { "code": "invalid_request", "message": "must be at least 0.50", "param": "amount" }}| Field | Description |
|---|---|
code | Stable, machine-readable code (below). Branch on this. |
message | Human-readable explanation. May change; don’t parse it. |
param | The request parameter at fault, when there is one |
| Status | Code | Meaning | What to do |
|---|---|---|---|
400 | invalid_request | A parameter is missing or invalid | Fix the request; see param |
401 | unauthorized | Missing, invalid or revoked credential | Check the key and its mode |
403 | forbidden | The account is suspended | Contact support |
404 | not_found | The resource does not exist in this mode | Check the id and that you use the right mode’s key |
409 | conflict | The request conflicts with the current state (for example the payment is no longer awaiting payment) | Fetch the payment and act on its status |
422 | method_unavailable | The token and network can’t be used for this payment | Offer another method |
429 | rate_limited | Too many requests of this kind | Slow down; for addresses, create a new payment |
500 | internal_error | Something went wrong on our side | Retry with backoff; contact support with the Request-Id |
503 | network_busy | A blockchain network provider is busy | Retry after the Retry-After header (seconds) |
Retrying
Section titled “Retrying”Retry 500 and 503 with exponential backoff. Creating a payment is safe to retry with the
same payment_id: you never get a duplicate.