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

# Wallets

> Each Jaza customer has a wallet that holds their credit balance, updated on top-up and consume.

Every Jaza customer owns a wallet for a given app and environment (sandbox or live). The wallet stores their current credit balance and updates as customers top up and spend.

## One wallet per customer (per environment)

Create customers with `@jazadev/node` (`createCustomer`). You get an id with a `cus_` prefix. Store that id on your user record and pass it to `getBalance`, `topUp`, and `consume`.

## Balance rules

* Non-negative integer balance.
* Atomic deductions on `consume` (race-safe).
* Top-ups and successful consumes reflect immediately for subsequent reads.

## How balances change

| Action   | Trigger                      | Balance                        |
| -------- | ---------------------------- | ------------------------------ |
| Increase | MoMo / card top-up completed | +credits from bundle           |
| Decrease | `jaza.consume()` succeeds    | −feature cost (or raw credits) |

## UI in your app

Use the React Native SDK (not invented component names):

* **`JazaBalanceWidget`** — shows balance via your `getBalance` callback.
* **`JazaTopUpButton`** — opens the MoMo top-up sheet after your backend returns a JWT.

## Next steps

* [Ledger](/concepts/ledger) · [Top up](/guides/top-up) · [Consume credits](/guides/consume-credits)
