How to accept online payments in Kenya: M-Pesa, cards and gateways
We earn a commission if you buy through some links on this page, at no extra cost to you. It never affects the order. How we make money.
To accept online payments in Kenya, you need M-Pesa first and cards second. Most Kenyan customers pay by mobile money, so a business that accepts only cards loses many sales. The usual setup is an M-Pesa paybill or till number, connected to your website or app through Safaricom's API or a payment gateway, plus card payments through a gateway that settles in shillings. This guide explains each option, what to check on fees, how to set up, settlement, eTIMS and how to choose a provider.
How Kenyans pay online
M-Pesa dominates digital payments in Kenya. Customers pay businesses through Lipa na M-Pesa, using a paybill number (with an account reference) or a till number (Buy Goods), or by approving a payment prompt sent to their phone. Cards are used too, especially for international websites, subscriptions and larger purchases, and bank transfers are common for B2B payments. Other mobile money services, such as Airtel Money, have smaller shares.
For most consumer businesses, M-Pesa should be the default option at checkout, with cards as an alternative.
Paybill vs till number
- Till number (Buy Goods): customers enter the till number and amount. Simple, suited to shops and quick payments. No account reference, so matching payments to orders relies on amounts, times and phone numbers.
- Paybill number: customers enter the paybill and an account number, such as an order or invoice number. Better for online businesses, subscriptions and invoices, because payments can be matched automatically.
Both are Lipa na M-Pesa products applied for through Safaricom, with requirements that depend on whether you are a registered business. Safaricom charges merchants a tariff on payments received, which varies by product and amount; check Safaricom's current tariff before deciding.
STK push: the smoothest online checkout
The best online M-Pesa experience is STK push, also called Lipa na M-Pesa Online or M-Pesa Express. At checkout, the customer enters their phone number, receives a prompt on their phone, enters their M-Pesa PIN and the payment completes, with your system notified automatically. There is no need for the customer to type a paybill number or account reference, which reduces errors and abandoned carts.
STK push is available through Safaricom's Daraja API for developers, or through payment gateways that handle the integration for you.
Using Safaricom's Daraja API directly
Daraja is Safaricom's developer platform for M-Pesa. With a paybill or till and API credentials, developers can implement STK push, receive payment confirmations, check transaction status and, with additional products, send payouts to customers or suppliers. Going direct avoids a gateway's margin, but you need development work, secure handling of credentials and callbacks, and your own reconciliation and support processes.
Direct integration suits businesses with developers and significant volume. Smaller businesses usually do better with a gateway or plugin that handles the technical side.
Payment gateways in Kenya
Several gateways operate in Kenya, combining M-Pesa, other mobile money and card payments in one checkout. Examples include Pesapal, Flutterwave and Paystack, which launched in Kenya after its acquisition by Stripe, along with bank-owned options. Gateways add their own fees on top of or instead of Safaricom's tariffs, and offer plugins, payment links, dashboards and settlement to your bank account.
When we last checked, Paystack's Kenya pricing page did not load its fees, so confirm current pricing directly with each provider. Compare gateways in the global payment gateways ranking, and read payment gateway fees explained for what to compare.
Accepting card payments
For card payments, use a gateway that supports local and international Visa and Mastercard, with 3-D Secure authentication and settlement in shillings, and optionally dollars. Card fees are usually a percentage of the transaction, sometimes higher for international cards. Cards matter for customers abroad, for subscription businesses, and for larger purchases where customers want card protection.
If you sell to international clients, card gateways, invoicing tools or international payment accounts may be better than local options; see how to get paid by international clients and how to receive USD payments in Africa.
What you need to sign up
- Business registration documents, such as a certificate of registration or incorporation.
- KRA PIN for the business and directors.
- Directors' national IDs or passports.
- A business bank account for settlement.
- Website or social media presence describing what you sell.
- For some sectors, licences or additional documents.
Some gateways and Safaricom products accept individuals or sole traders with fewer documents and lower limits. Verification can take days, so apply early.
Setting up on your website
For hosted stores and website builders, check for built-in M-Pesa support or plugins from your chosen gateway; see the e-commerce ranking and how to start an online store in Africa. WordPress and WooCommerce have M-Pesa and gateway plugins. Custom sites and apps can use Daraja or a gateway's API.
Show M-Pesa first at checkout, explain the STK push step ("You will receive a prompt on your phone"), and handle cases where the customer does not complete the prompt, such as a retry button and clear instructions.
Selling without a website
Many Kenyan businesses sell on WhatsApp, Instagram and Facebook. Share your till or paybill number, or use gateway payment links that accept M-Pesa and cards. Ask customers to use an order number as the paybill account reference so payments can be matched. Our WhatsApp link generator creates click-to-chat links, and WhatsApp CRM explains how to manage orders in chat.
Fees to compare
When comparing options, look at:
- Safaricom's tariff for your paybill or till product.
- Gateway fees for M-Pesa, which may replace or add to Safaricom's charges.
- Card fees for local and international cards.
- Settlement or withdrawal fees to your bank.
- Currency conversion fees for dollar payments.
- Monthly or setup fees, if any.
Calculate the total cost on your typical transaction sizes. Our international payment calculator helps compare cross-border options.
Settlement and reconciliation
M-Pesa payments to your paybill or till accumulate in your M-Pesa business account, which you can withdraw to your bank, sometimes automatically. Gateways settle to your bank on a schedule. Reconcile M-Pesa statements and gateway reports with your orders and invoices regularly; accounting software that imports M-Pesa statements saves a lot of time. See accounting software in Kenya.
eTIMS and tax
Sales received through M-Pesa and gateways must be invoiced and declared. Kenya's eTIMS requires businesses to issue invoices electronically to KRA, and KRA uses mobile money and bank data in compliance checks. Make sure every sale is invoiced through eTIMS, and reconcile M-Pesa receipts with invoices. See how to register for eTIMS and our Kenya VAT calculator.
Refunds, disputes and fraud
M-Pesa payments can be reversed in limited cases, such as payments sent to the wrong number, through Safaricom's reversal process. Card payments can be disputed through chargebacks. Reduce disputes with clear product descriptions, refund policies and delivery updates. Watch for common scams, such as fake M-Pesa confirmation messages; always confirm payment in your M-Pesa business portal or gateway dashboard before releasing goods.
Choosing a setup
- Small shop or social seller: a till or paybill, plus payment links for cards if needed.
- Online store: a gateway with M-Pesa STK push and cards, integrated with your store.
- Subscription or SaaS business: a gateway supporting recurring card payments plus M-Pesa, or direct Daraja integration for M-Pesa.
- B2B services: invoices with bank transfer and M-Pesa paybill details, plus card links for international clients.
Common mistakes
- Accepting only cards and losing M-Pesa customers.
- Using a till number online, making payments hard to match.
- Releasing goods based on SMS screenshots that may be fake.
- Not invoicing M-Pesa sales through eTIMS.
- Comparing gateway fees without considering Safaricom tariffs.
- Not reconciling M-Pesa statements regularly.
Example: an online bookshop in Nairobi
An online bookshop sells to customers across Kenya. At first, it displayed a till number and asked customers to send the M-Pesa confirmation by WhatsApp, which caused delays and errors. It moved to a gateway with STK push: customers enter their phone number at checkout, approve the prompt and the order is confirmed automatically. Card payments are offered for customers abroad who buy gifts for family in Kenya.
Abandoned checkouts fell, staff no longer check messages for payments, and reconciliation is automatic because each payment is linked to an order. The shop issues eTIMS invoices from its accounting software for every order. For delivery and store setup, see how to start an online store in Africa.
Example: a training company taking deposits
A training company in Mombasa sells courses to businesses and individuals. Individuals pay deposits by M-Pesa paybill, using their booking number as the account reference, so payments match bookings automatically. Business clients receive invoices with bank details, the paybill number and a card payment link. The company sends reminders before balances are due using its booking system, and reduces no-shows by requiring deposits; see how to reduce appointment no-shows.
Recurring payments and subscriptions
Recurring billing is harder with M-Pesa than with cards, because customers approve each payment. Options include sending an STK push each billing cycle for the customer to approve, using M-Pesa products that support standing orders where available, or offering cards for automatic renewal. Many Kenyan subscription businesses offer discounts for longer prepaid periods to reduce the number of payment requests. Send reminders before each charge to reduce failures.
Payouts to suppliers and customers
Businesses that pay riders, agents, sellers or customers, such as marketplaces or delivery apps, can use M-Pesa B2C payments through Daraja or a gateway's payout feature. These have their own tariffs and approval requirements. For salaries, use payroll software that handles PAYE and statutory deductions; see PAYE in Kenya. For paying suppliers abroad, see how to pay overseas suppliers.
Security and staff access
Your M-Pesa business portal and gateway dashboard control money. Restrict access to people who need it, use separate logins, turn on two-factor authentication where available, and store credentials in a password manager. Keep API credentials secure on your server, never in website code. Review withdrawals and settings regularly, and train staff to verify payments in the portal, not by SMS or screenshots.
Testing before you go live
Daraja and most gateways offer a sandbox where you can test payments without real money. Test successful payments, cancelled prompts, wrong PINs, timeouts and duplicate callbacks, and make sure your system handles each without creating paid orders by mistake. Then run a few small live payments yourself before announcing the new checkout. Testing on several phones and networks catches problems that only appear for some customers.
Measuring payment performance
Track a few numbers monthly: the share of checkouts that complete, payment success rate by method, the most common failure reasons (such as cancelled prompts or insufficient funds), average time to settlement, and total fees as a share of revenue. If STK push failures are high at certain times, network issues may be the cause; offering a paybill fallback helps. If fees creep up, renegotiate or compare providers. Reviewing these numbers turns payments from a black box into something you can improve.
Questions
What is the best way to accept online payments in Kenya?
M-Pesa through STK push at checkout, plus card payments through a gateway. Most customers prefer M-Pesa.
How long does it take to get a paybill number?
It depends on Safaricom's verification of your documents. Apply early and have registration documents, KRA PIN and bank details ready.
Can I accept M-Pesa from customers outside Kenya?
M-Pesa is mainly used within Kenya, though some international remittance services can send to M-Pesa. For customers abroad, offer card payments or international payment options.
What is the difference between a paybill and a till number?
A paybill uses an account reference, which makes matching payments to orders easy. A till number is simpler but has no account reference.
What is STK push?
A payment prompt sent to the customer's phone, where they enter their M-Pesa PIN to pay. It is the smoothest online M-Pesa checkout.
What is the Daraja API?
Safaricom's developer platform for integrating M-Pesa payments, confirmations and payouts into websites and apps.
Does Stripe work in Kenya?
Stripe-owned Paystack operates in Kenya. Check each provider's current country support and pricing before choosing.
Do I need a registered business to accept M-Pesa?
Some Lipa na M-Pesa products and gateways accept individuals with limits. Registered businesses get full features.
Do M-Pesa sales need eTIMS invoices?
Yes. Sales must be invoiced through eTIMS regardless of how customers pay.