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

# insufficient_credit

> 402 payment — the balance can't cover this run's reservation. Balance and open reserves ride in the error.

**HTTP 402 · type `payment`.** Every spending run reserves its full `max_spend_usd`
against your balance before the engine dispatches anything. This request's
reservation exceeded the available balance — which is credits minus **open
reserves** (other runs currently in flight hold their ceilings too). Nothing ran and
nothing was charged.

## The shape

```json theme={null}
{
  "error": {
    "type": "payment",
    "code": "insufficient_credit",
    "message": "This session asked to reserve $1.00 but the balance is $0.44.",
    "doc_url": "https://docs.fiveninelabs.com/errors/insufficient_credit",
    "request_id": "req_8fk2m1",
    "balance_usd": 0.44,
    "open_reserves_usd": 0,
    "top_up_url": "https://platform.fiveninelabs.com/billing"
  }
}
```

The figures are live: `balance_usd` is what's available, `open_reserves_usd` is what
in-flight runs are holding. `top_up_url` is where to add credit.

## How to fix

* Top up at `top_up_url`. Credits never expire.
* Or lower `max_spend_usd` — the reservation is the ceiling you asked for, not a
  price; runs settle at measured actuals and release the rest. A smaller honest
  budget often fits.
* If `open_reserves_usd` is the culprit, wait for in-flight runs to settle (their
  unspent reservation releases at terminal) — or stop one.
* To get ahead of this error, subscribe a webhook to `balance.low` — it fires when
  your balance crosses your threshold, **before** the 402.

## Reproduce it

Deterministic on an `fn_test_` key with the
[`FN_TEST_402` sentinel](/guides/test-mode) — same envelope, \$0:

```bash theme={null}
curl https://api.fiveninelabs.com/v1/sessions \
  -H "Authorization: Bearer $FIVENINE_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "FN_TEST_402 vinyl records", "max_spend_usd": 1}'
```
