Prerequisites
- A Jaza developer account
- Node.js 18+
- A React Native (Expo) or React web app
- Sandbox API keys from the dashboard
1. Create an app and copy keys
In the dashboard:- Create an app and enable Countries (Mobile Money markets)
- Add at least one feature (e.g.
SEND_MESSAGE) and one bundle - Open API keys and copy sandbox keys
- React Native
- React
Use
EXPO_PUBLIC_JAZA_PUBLISHABLE_KEY (or your bundler’s public env) for the publishable key.customerId under live and overwrite it in your user database — test wallets do not carry over. See Authentication → Going live.
2. Install the backend SDK
- Node
3. Create a customer
Call once when your user signs up; storecustomer.id on your user record.
4. Expose a host init route
Your app needs a client session from your backend. Map the signed-in user → JazacustomerId → jaza.init.
getSession vs authEndpoint and 401 re-auth.
5. Install the frontend SDK
- React Native
- React
app.json):6. Wrap the app with JazaProvider
Pass getSession so the SDK loads the client session from your init route. Top-up JWTs are minted internally — no host onRequestToken.
- React Native
- React
7. Balance, top-up, ledger, and gated actions
- React Native
- React
JazaBalance— credits from the session snapshot / client wallet refreshJazaTopUpButton— opens MoMo checkout; SDK mints the top-up JWT from the sessionJazaLedger— recent movements (previeworscroll)JazaActionButton— gate only; opens top-up when balance is too low; never debits
8. Meter a feature on the host
JazaActionButton is UX. Real enforcement is always jaza.consume on your backend with the secret key.
featureCode and credits to override the dashboard default while still attributing the feature. See Consume credits.
Optional: merchant webhooks
Register HTTPS endpoints under App Settings → Webhooks, then verify payloads withjaza.webhooks.constructEvent. See Webhooks.
What you just shipped
- Client session handshake (no secret in the app)
- Credit wallet UI + MoMo top-ups without running an aggregator
- Feature gating in the UI and metering on your backend