> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stablemesh.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Error codes returned by the Open API, and what to do about each.

An error response has a non-zero `code` and a `message`, and its HTTP status matches the code.

```json theme={null}
{
  "code": 4014,
  "message": "..."
}
```

A `400` error means the request was refused and **nothing changed**. You can fix the request and send it again.

***

## HTTP statuses

| HTTP | Meaning |
| - | - |
| `200` | Success (`code` is `0`) |
| `400` | Refused. Nothing changed |
| `401` | API key problem |
| `403` | IP not allowed, or access denied |
| `409` | Idempotency conflict |
| `429` | Rate limited |
| `500` | Internal error. The outcome may be unknown |

***

## Codes

| Code | HTTP | Meaning |
| - | - | - |
| `400` | 400 | A parameter is missing or invalid, or the body isn't valid JSON |
| `403` | 403 | Access denied |
| `1111` | 400 | Not enough balance in your USD account |
| `4001` | 400 | No such card on your account |
| `4004` | 400 | Unknown product `binId` |
| `4005` | 400 | That product isn't available to your account |
| `4007` | 400 | The card has pending orders. Try again once they finish |
| `4008` | 400 | The card is already being cancelled |
| `4011` | 400 | This change isn't supported on this card through the API. Use the dashboard |
| `4014` | 400 | The card's current status doesn't allow this change |
| `4015` | 400 | Another change to this card is still in progress |
| `4210` | 400 | `Idempotency-Key` is required |
| `4211` | 409 | `Idempotency-Key` was already used with a different request |
| `4212` | 409 | A request with this `Idempotency-Key` is still in progress |
| `4504` | 400 | Verify your identity in the dashboard before issuing a card |
| `8102` | 400 | No such withdrawal on your account |
| `9999` | 500 | Internal error. Check state before retrying |
| `11001` | 400 | Deposits aren't available on that network |
| `11002` | 401 | Missing, invalid, revoked or expired API key, or inactive account |
| `11003` | 403 | Request from an IP that isn't on the key's allowlist |
| `11004` | 429 | Too many requests for this key |

Other codes may appear. Treat any non-zero `code` as an error and show its `message`.

***

## Handling `9999`

A `9999` means something failed on our side, and the operation may or may not have happened. Before retrying a money operation:

* **`card/withdraw`**: the error's `data.withdrawalId` identifies the withdrawal. Check it with `card/withdraw/status`.
* **Other operations**: check the card with `card/detail`, or the balance with `card/balance`.

If you sent an `Idempotency-Key`, retrying with the same key returns the same `9999`. Use a new key once you know the state.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.