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

# Balances and ledger

> The accounting record of value that has verifiably reached you.

Your ledger is the record of every value that has verifiably reached your destination. It lives
in Useroutr's database; blockchain transactions are the evidence behind each entry, and the
ledger is the account.

<Note>
  Useroutr holds no funds for you. Your balance describes what has already settled to your own
  destination account.
</Note>

## One intent, one credit

A successful funding intent results in exactly one posted `CREDIT`. Unique constraints in the
database enforce this, so a replayed webhook, a retried job or a repeated call can never post a
second one, and reconciliation flags any drift.

## Balances

One balance per asset, projected from posted entries.

```ts theme={null}
const { data: balances } = await useroutr.balances.list("app_5c1e0a9f");
```

## Ledger entries

Newest first, cursor paginated.

```ts theme={null}
for await (const entry of useroutr.ledger.iterate("app_5c1e0a9f")) {
  if (entry.type === "CREDIT" && entry.status === "POSTED") {
    console.log(entry.amount, entry.asset, entry.funding_intent_id);
  }
}
```

| Field | Values |
| - | - |
| `type` | `CREDIT`, `REFUND` or `ADJUSTMENT` |
| `direction` | `CREDIT` or `DEBIT` |
| `status` | `PENDING`, `POSTED` or `VOIDED`. Only `POSTED` counts. |
| `amount` | A decimal string in `asset` |

Each entry links to the funding intent, payment, settlement or refund it came from. Entries are
never edited: a correction is a new, compensating entry.

Your application id is on `useroutr.applications.current()`, and in the dashboard under
**Settings → Application**.


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