M-Pesa setup for treasurers

eChama works with your group's own paybill or till — member money goes straight into your chama's M-Pesa account, never through ours. Connecting takes three stages. You can use eChama fully without this (recording payments manually); connecting simply automates the money side.

Stage 1 — Get a shortcode (if you don't have one)

  • Already have a paybill or till? Skip to Stage 2. Bank-provided paybills (KCB, Co-op and Equity chama accounts) work too.
  • Buy Goods Till: the fastest route — apply through the M-PESA Business app or a Safaricom shop with your group registration certificate and ID. Usually ready in days.
  • Paybill: apply at a Safaricom Business centre with your group registration certificate (from Social Services), KRA PIN and bank account details. Allow 1–3 weeks.

Stage 2 — Get Daraja API credentials

Daraja is Safaricom's system that lets apps like eChama talk to your shortcode.

  1. Create a free account at developer.safaricom.co.ke and create an app.
  2. Submit a Go-Live request for your shortcode (the portal walks you through it — you'll confirm you own the shortcode via the M-Pesa org portal).
  3. When approved, Safaricom issues three things: a consumer key, a consumer secret, and a Lipa na M-Pesa passkey. Keep them safe — they are the keys to your till.

Stuck? This is the fiddliest step for most groups — email [email protected] and we'll walk you through it (or do it with you on a call).

Stage 3 — Connect it to eChama (2 minutes)

  1. In your chama, open Settings → M-Pesa API (Daraja) (chairperson or treasurer only).
  2. Enter the shortcode, choose paybill or till, and paste the consumer key, consumer secret and passkey.
  3. Click Save & verify — eChama tests the credentials against Safaricom before accepting them, then encrypts them. They are never displayed again, to anyone.

From that moment: STK pushes prompt members from your shortcode, paybill payments auto-match to members, QR codes point at your till, and the treasurer can pull statements and check the shortcode balance from Reports.

Optional — automated payouts (B2C)

To have loan disbursements and payouts sent automatically from your shortcode to members' phones, apply for the B2C product on your shortcode and create an initiator user in the M-Pesa org portal, then add the initiator name and security credential in the same Settings card. Until then, payouts simply fall back to manual — the treasurer sends the money and records it.

Why we do it this way: your money never passes through eChama's accounts. It moves member → your chama's M-Pesa, directly, on Safaricom's rails. We only automate the paperwork around it. See the FAQ for more on security.