Skip to main content
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

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