Why M-Pesa is the default rail in Kenya
M-Pesa is a major route to evaluate for merchants selling to Kenyan customers, especially where buyers prefer mobile money over cards. That does not mean every merchant can or should add it without verification. Confirm Safaricom Daraja access, PSP or aggregator route, entity requirements, Till or Paybill setup, settlement account, fees, payment confirmation, refunds, reversals, disputes, support ownership, and reconciliation before launch. Treat buyer familiarity as a reason to investigate, not as an automatic integration decision.
- Evaluate M-Pesa where Kenyan buyer behavior and mobile-money trust matter.
- Confirm whether you connect directly through Daraja or through a PSP or aggregator.
- Ask about entity, Till or Paybill, settlement account, fee, and support requirements.
- Verify confirmation, refund, reversal, dispute, and reconciliation workflows before launch.
- Keep cards or other routes in scope where buyer segment and provider approval require them.
STK Push and the online checkout flow
The main online flow is called M-PESA Express, also known widely as STK Push or Lipa na M-Pesa Online. At checkout the customer enters their phone number. Your system calls the Daraja API, and Safaricom pushes a payment prompt to the customer's phone. The customer enters their M-Pesa PIN to approve. Safaricom then sends a callback to your server confirming success or failure, often in seconds. This is far better than asking the customer to manually send money and forward a receipt, because the system updates the order automatically. For online stores, STK Push is the standard pattern. A second flow, C2B, is used when the customer initiates payment to your Paybill or Till with a reference number, which suits bills and fees.
- STK Push sends a prompt to the customer's phone at checkout.
- Customer approves with their M-Pesa PIN.
- A provider callback updates your order status; test the timing and failed-state handling.
- C2B with a reference suits bills, fees, and offline payments.
Till number vs Paybill
To accept M-Pesa you need a business number. A Till number (Buy Goods) fits retail and ecommerce where the amount is set at checkout. A Paybill (shortcode) fits fee-style payments where the customer also enters a reference, such as school fees or rent. Recent till accounts may use Till 2.0, which supports both Buy Goods and Pochi La Biashara accounting flows. Choose based on how your customer pays: dynamic amount at a shop or app means Till; fixed bill with a reference means Paybill. Both are obtained from Safaricom with business documents such as a registration certificate, KRA PIN, and a bank account in the business name.
- Till (Buy Goods) for retail and dynamic checkout amounts.
- Paybill for reference-based bills and fees.
- Till 2.0 supports both Buy Goods and Pochi flows.
- Both need business registration, KRA PIN, and a business bank account.
Direct API vs no-code aggregator
You can integrate M-Pesa two ways. The direct way is through the Daraja API: a developer registers an app, gets API credentials, tests in the sandbox, and goes live. This gives you full control and no middleman fee on top of Safaricom's rate. The no-code way is through a Kenyan payment aggregator such as Pesapal, IntaSend, or iPay, which already built the M-Pesa integration and gives you a plugin or hosted checkout. For a WordPress or Shopify store, the aggregator plugin is the fastest route and needs no developer. For a custom app, direct API is cleaner. Either way, keep your API credentials on your server, use HTTPS callback URLs, and reconcile daily.
- Direct Daraja API: full control, needs a developer.
- Aggregator plugin: fastest for WordPress or Shopify, no code.
- Aggregators add their own fee on top of Safaricom's rate.
- Always keep credentials server-side and use HTTPS callbacks.
Fees, settlement and float
Safaricom does not usually charge for the API itself, but it takes a transaction fee on incoming payments, commonly around 0.5% to 1.5% with a cap, and B2C sends (refunds, payouts) carry their own per-transaction fees. Published rates change and higher-volume merchants can sometimes negotiate, so confirm the current schedule with your Safaricom account manager. Funds sit in your Till or Paybill and you sweep them to your bank, which may carry a withdrawal fee. Public pricing is only a first filter. Actual pricing changes with country, industry, volume, settlement currency, integration method and contract terms. Confirm against the provider's official pricing page or a written quote before you go live.If you use an aggregator, add the aggregator's fee to Safaricom's fee to get your true cost. Watch your float if you do B2C payouts, because a low balance will fail mid-flow.
- Incoming M-Pesa fees commonly run about 0.5% to 1.5% with a cap.
- B2C sends (refunds, payouts) have separate per-transaction fees.
- Sweeping to a bank may add a withdrawal fee.
- Aggregator use means Safaricom fee plus aggregator fee.
Go-live checklist for merchants
Start by getting your Till or Paybill and registering on the Daraja portal. Test STK Push in the sandbox with fake currency until callbacks and order updates work. Then request production credentials and submit your business documents. If you use an aggregator, test their plugin in staging first. On go-live, reconcile the first week of M-Pesa settlements by hand against your orders, and confirm the callback URL is reachable over HTTPS. Finally, track your real all-in cost including any aggregator fee and bank sweep, because the headline number is rarely your true cost.
- Get Till or Paybill and register on Daraja.
- Test STK Push in the sandbox before production.
- Reconcile first-week settlements manually.
- Track true cost including aggregator and sweep fees.
Questions merchants ask
Do I need a developer to accept M-Pesa online?
Not always. A Kenyan payment aggregator with a WordPress or Shopify plugin lets you add M-Pesa with no coding. A custom app or full control needs a developer using the Daraja API.
What is the difference between Till and Paybill?
A Till (Buy Goods) is for retail and checkout amounts set at the point of sale. A Paybill is for payments with a reference number, such as fees or bills. Pick based on how the customer pays.
How fast is settlement with M-Pesa?
Do not treat callback confirmation as the same thing as bank settlement. Ask the provider or Safaricom route to confirm payment confirmation timing, Till or Paybill balance handling, bank sweep timing, withdrawal fees, failed transfers, refunds, reversals, disputes, and reconciliation files in writing.
Can a foreign company use M-Pesa directly?
Direct M-Pesa merchant use expects a Kenyan business with registration, KRA PIN, and a business bank account. Foreign sellers usually collect through a local aggregator or PSP instead.