The verdict in three sentences
In Kenya and Tanzania, M-Pesa is not an option, it's the default rail: without it, your app loses the majority of payments. Integration goes through Safaricom's Daraja API (STK Push to pull, C2B to receive pushes, B2C to disburse), with merchant fees around 1.5% per collection in 2026. Plan for 3 to 6 weeks between sandbox access and validated production, with most of the time spent handling callbacks and timeouts.
The Daraja APIs and what they do
Safaricom exposes several endpoints via the Daraja platform. Each covers a distinct business flow: collecting from a customer, receiving a customer-initiated payment, or disbursing funds.
| Daraja API | Use | Flow direction | Typical case |
|---|---|---|---|
| STK Push (Lipa na M-Pesa Online) | App collection | App → customer (pull) | E-commerce cart payment |
| C2B | Customer to merchant | Customer → app (push) | Paybill/Till payment |
| B2C | Disbursement | App → customer | Refund, salary, payout |
| B2B | Merchant to merchant | App → app | Supplier settlement |
| Account Balance | Account balance | Read | Treasury dashboard |
| Transaction Status | Status check | Read | Reconciliation |
In Tanzania, M-Pesa is operated by Vodacom on its own platform (often via an aggregator), but the STK Push / C2B / B2C logic is the same. Expect separate credentials and environments per country.
Fees and limits: 2026 ballpark
Fees vary by merchant account type (Paybill vs Till) and are negotiable by volume. The figures below are a 2026 estimate to confirm with your Safaricom account manager.
| Parameter | Kenya (M-Pesa) | Tanzania (M-Pesa TZ) |
|---|---|---|
| Merchant collection fee | ~1.5% | ~1.8% |
| Per-transaction limit | 250,000 KES | 5,000,000 TZS |
| Customer balance limit | 500,000 KES | — |
| B2C payout delay | Instant to 24h | Instant to 48h |
| Sandbox access | Free | Free |
| Paybill setup fee | Variable | Variable |
Integration steps and timelines
| Step | Deliverable | Estimated time |
|---|---|---|
| Daraja developer account | Sandbox keys | 1 day |
| App registration + credentials | Consumer key/secret | 2-3 days |
| STK Push in sandbox | Test payment OK | 3-5 days |
| Callback + timeout handling | Reliable callback URL | 5-7 days |
| Go-live (real Paybill/Till) | Safaricom validation | 1-2 weeks |
| C2B + B2C tests | Full flows | 3-5 days |
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
The critical point: the callback. STK Push returns the result asynchronously. Without a reliable public HTTPS callback URL and Transaction Status reconciliation as a backup, you'll leave payments in an "unknown" status.
Mini case study
Grace, founder of an invoicing SaaS in Nairobi, collects 1,200 subscriptions at 900 KES/month, or 1,080,000 KES in monthly revenue. At 1.5% M-Pesa fees, she pays 16,200 KES/month in commissions, about ~194,400 KES/year. By automating retries via STK Push on failed payments (timeouts included), she recovers 8% of initially lost transactions, roughly ~86,000 KES/month in additional revenue — far more than the cost of fees.
FAQ
Do you need a local company to get a Paybill account? Yes, in Kenya an M-Pesa merchant account requires a registered entity and a local bank account. Plan for a few days to two weeks depending on documents.
Is the Daraja sandbox free? Yes, developer access and the sandbox are free. Fees only appear in production, on real transactions (~1.5%).
Can the same integration work in Kenya and Tanzania? The API logic is similar but platforms, credentials and currencies differ (KES vs TZS). Plan two separate configurations.
How long to reach production? On average 3 to 6 weeks, with Safaricom's Paybill go-live validation often being the bottleneck.
How do you avoid unknown-status payments? Combine the STK Push callback with a scheduled Transaction Status call (e.g. every 5 minutes) to catch lost callbacks.
Let's talk about your project. We integrate M-Pesa, Wave and Orange Money into your app with reliable callbacks and automatic reconciliation. WhatsApp +221 77 596 93 33.
Mohamed Bah
Fondateur, Kolonell
Passionate about digital and entrepreneurship in Africa, Mohamed has been helping Sénégalese businesses with their digital transformation since 2020. Founder of Kolonell, he believes every SME deserves a professional and accessible online présence.
