Register members, run rotating savings groups, collect mobile-money contributions, approve payouts and read the ledger. Every error is bilingual and every financial mutation is auditable.
Short-lived HMAC-signed tokens from /v1/auth/login. Send Authorization: Bearer … on every protected call.
Amounts are whole shillings as integers. No floats, no rounding. The ledger is append-only and balances are derived.
Every error carries English and Swahili: {"error":{"code","message","message_sw"}}.
Payment intents take an idempotency_key. Provider references and ledger entries are unique by database index.
Base URL: https://api.kijumbesmart.co.tz/v1. The same API is reachable at /api/v1 for the web app and provider callbacks.
# 1. Sign in (returns access_token + user) curl -X POST https://api.kijumbesmart.co.tz/v1/auth/login \ -H 'Content-Type: application/json' \ -d '{"phone":"0700000001","password":"YOUR_PASSWORD"}' # 2. Who am I? curl https://api.kijumbesmart.co.tz/v1/me \ -H "Authorization: Bearer $TOKEN" # 3. Open groups, and a member's groups curl 'https://api.kijumbesmart.co.tz/v1/games?q=' -H "Authorization: Bearer $TOKEN" curl https://api.kijumbesmart.co.tz/v1/me/games -H "Authorization: Bearer $TOKEN" # 4. Start a contribution (member) curl -X POST https://api.kijumbesmart.co.tz/v1/payments/intents \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{"obligation_id":"obl_…","idempotency_key":"cycle-1-member-1"}'
| Method + path | Who | Purpose |
|---|---|---|
POST /auth/register | public | Create a member (E.164-normalized Tanzanian phone) |
POST /auth/login | public | Exchange phone + password for a bearer token |
GET /meta | public | Dev flag, active provider, websocket URL |
GET /games | signed in | Discover open groups by name or code |
POST /games/:id/memberships | member | Join after accepting accept_rules_version |
POST /games/:id/start | kijumbe | Fix payout order and create N×N obligations |
POST /payments/intents | member | USSD/STK push; confirmed only by a provider callback |
GET /games/:id/schedule | member / kijumbe | Payout order, pot and who has paid |
POST /games/:id/payouts | kijumbe | Request the next cycle's payout |
POST /payouts/:id/approve | different admin | Maker-checker approval, then durable release |
GET /reports/games/:id | member / kijumbe | Obligations, collections, payouts, pool, ledger |
GET /reports/games/:id/ledger.csv | kijumbe | Append-only ledger export |
The full surface (claims, KYC, penalties, deposits, reliability, admin, integrations) is in the Postman collection.
POST /api/v1/payments/webhook/selcom/<token>
The URL token is generated in Admin → Integrations. The unsigned body is never trusted: the API calls Selcom order-status before counting a payment.
POST /api/v1/payments/provider-webhook
JSON body in the normalized callback shape, signed with hex(HMAC-SHA256(secret, body)) in X-Signature.
Contributions are never marked paid by a client. A valid callback, a matching amount, a single-use provider reference and the ledger all have to agree.