Payment integration for apps, websites and systems in Kenya
M-Pesa first, because that is how Kenya pays. Cards and Airtel Money through a Kenyan gateway when your customers need them. One checkout, one set of records, and a statement that matches.
KEPAS adds payments to apps, websites and business systems anywhere in Kenya. Most of that work is M-Pesa on Safaricom's Daraja API, which we run every day for our own products through Paybill 4052037. When your customers also pay by card or Airtel Money, we add a Kenyan payment gateway next to M-Pesa, so every method lands in the same records and the same statement.
What we integrate
- M-Pesa, direct on the Daraja API
- STK Push, Paybill and Till payments, B2C payouts and the callbacks that make them reliable, on your own shortcode with no gateway fee. Read how we integrate M-Pesa.
- Card payments through a gateway
- Visa and Mastercard through a Kenyan gateway such as Pesapal, IntaSend, Flutterwave or DPO. The gateway hosts the card form, so card numbers never reach your server.
- Airtel Money
- Through the same gateway, so an Airtel customer gets a prompt on their phone the way an M-Pesa customer does, and the payment lands in the same records.
- Checkout and payment pages
- A pay button in your app, a payment link you send on WhatsApp, or a hosted page for invoices. The customer picks M-Pesa, card or Airtel Money and your system learns the result at once.
- Receipts, records and reconciliation
- Every payment is stored once with its reference, the customer gets a receipt, and a daily match against the M-Pesa statement or the gateway settlement report shows anything missing.
- Refunds and failed payments
- Reversals on M-Pesa, refunds through the gateway, and clear states in your system, so a failed or cancelled payment is never counted as paid.
Where it goes to work
- School fees and admission forms
- Hospital and clinic bills
- Online shop checkout
- Donations and memberships
- Subscriptions and renewals
- Rent, service charges and invoices paid by link
Direct M-Pesa or a payment gateway
The first decision on every payment project. Here is how the two compare in Kenya today.
| M-Pesa on your Paybill or Till | Payment gateway | |
|---|---|---|
| Methods | M-Pesa only | M-Pesa, cards and Airtel Money, some add bank transfers |
| Fees | No API fee. Only the normal M-Pesa tariff on your shortcode | A share of each payment, usually around three per cent, plus the M-Pesa tariff |
| Settlement | Money lands in your M-Pesa business account at once | The gateway settles to your bank, usually within a few days |
| Setup | Your own Paybill or Till and the Daraja Go-Live | An account with the gateway, your registration papers and KRA PIN, then API keys |
| Best for | Schools, rent, SACCOs and shops whose customers pay by M-Pesa | Online shops and services with card or foreign customers |
Many clients start with direct M-Pesa and add a gateway later for cards. We keep the two apart in the code, so adding one never means rewriting the other.
Why ask KEPAS
- Payments are our daily work, not a side job
- Paybill 4052037 collects rent for landlords on KodiSap. Wabi holds a client's M-Pesa payment until the job is done and pays the worker after. Both run on code we wrote and watch every day.
- We wrote the SDK other developers use
- daraja-js is our open source Node.js and TypeScript SDK for Daraja, published on npm as @kepas/daraja-js under the Apache 2.0 licence. Each check in it is a bug we hit with real money and now stop before it reaches you.
- Your records will match your statement
- Every callback is verified and stored before it is processed, and payments without a callback are pulled in afterwards, so the month-end match takes minutes instead of days.
- We have written it all down
- Read Adding M-Pesa to your app, what they don't tell you before you call us.
How a payment integration goes
- A short call. We look at your app or system, how your customers pay today and what a payment should trigger. You get a written quote and dates.
- Accounts. Paybill or Till and the Daraja app for M-Pesa. A gateway account with its documents when you need cards or Airtel Money. We help with the forms.
- Build and test. We build against the sandboxes, then test live with small real amounts on your own accounts.
- Go live. We watch the first days of real payments, then hand over the code, the credentials and a short guide. The code is yours.
What it costs
Adding M-Pesa to a website, app or system you already have costs between KSh 20,000 and KSh 60,000, quoted in writing after the first call. Adding a card gateway next to it is similar work on our side, plus the gateway's own onboarding, which the gateway does with you.
A new app with payments, offline sync and push notifications costs between KSh 150,000 and KSh 500,000. Websites start at KSh 30,000 on our pricing page. Gateways take their share of each payment and M-Pesa charges its normal tariff. Neither of those comes to us, and the quote we give is the price.
Payment integration questions
Which payment gateway should I use in Kenya?
Do I need my own Paybill or Till?
Can I take card payments without a registered business?
Is it safe to take cards on my website?
How do refunds work?
What happens when a payment fails or the customer cancels?
Can you integrate into a system I already have?
Do you work outside Nairobi?
Tell us how your customers pay today
Send a line about your app or system, whether you have a Paybill or Till, and whether you need cards. We reply with questions, then a written quote.