HTTP status codes
Status codes
Section titled “Status codes”| Status code | Meaning |
|---|---|
200 OK | The request succeeded |
201 Created | The request succeeded and created a new resource |
400 Bad Request | The request is malformed or failed validation, for example an amount below the minimum |
401 Unauthorized | The API key is missing or invalid |
403 Forbidden | The API key doesn’t have the scope this endpoint requires |
404 Not Found | The resource doesn’t exist, or belongs to another account |
409 Conflict | The orderId was already used — see Idempotency |
429 Too Many Requests | More than 200 requests per minute for this API key. Retry after the window resets |
500 Internal Server Error | Something went wrong on our side. Retry later, or contact support if it persists |
503 Service Unavailable | The operation is temporarily unavailable, for example deposits in a currency whose network fee can’t be quoted right now |
Error format
Section titled “Error format”Every error response has the same JSON body:
{ "code": "exceptions.invoice.orderIdAlreadyExists", "message": "Invoice with orderId order_1001 already exists", "extension": {}}| Field | Description |
|---|---|
code | Stable, machine-readable error code. Branch on this in your code |
message | Human-readable explanation. It may change, so don’t parse it |
extension | Optional extra details about the error |
Some codes you may handle explicitly:
| Code | Status | When |
|---|---|---|
exceptions.auth.insufficientScope | 403 | The API key lacks the scope for this endpoint |
exceptions.invoice.orderIdAlreadyExists | 409 | An invoice with this orderId already exists |
exceptions.depositFee.quoteUnavailable | 503 | The deposit network fee for this currency is temporarily unavailable |
Related pages
Section titled “Related pages”Authorization401 and 403 come from the API key
Idempotency409 means this orderId was already used