Skip to content
GuidesAfrica

How to accept M-Pesa payments online in Kenya

Published 5 min readKaazPay payments research team

Short answer

To accept M-Pesa online, a payment gateway sends a payment prompt to the customer’s phone for the order amount in KES, and the customer approves it on the handset with their M-Pesa PIN. KaazPay offers M-Pesa and Kenyan card pay-in, payouts to Kenyan bank accounts and mobile money wallets, and settles collections to you in USDT.

Key takeaways

  • M-Pesa, run by Safaricom, is the primary way many Kenyans pay and transfer money, so it should be the first option at a Kenyan checkout.
  • The payment is approved on the customer’s phone, so your page collects a phone number, not card details.
  • Most failed attempts are unapproved prompts: wrong number format, missed prompts and low balances. Design the waiting screen for them.
  • KaazPay adds Kenyan cards for pay-in and supports payouts to bank accounts and mobile money wallets in Kenya.
  • KES collections are settled to you in USDT; each channel’s cycle is confirmed before launch.
In this article
  1. 01Why does a Kenyan checkout need M-Pesa first?
  2. 02What happens during an online M-Pesa payment, step by step?
  3. 03Why do M-Pesa payments go unapproved, and how do you recover them?
  4. 04Where do Kenyan cards fit next to M-Pesa?
  5. 05How do you send payouts in Kenya?
  6. 06How are Kenyan shilling collections settled?
  7. 07What should you prepare before going live in Kenya?
  8. 08How to start accepting M-Pesa with KaazPay

Questions this article answers

  • “How can a foreign online business accept M-Pesa from Kenyan customers?”
  • “Our M-Pesa prompts often time out before customers approve. How do we reduce that?”
  • “Do we need cards as well as M-Pesa for a Kenyan checkout?”
  • “Can we send withdrawals to Kenyan users’ mobile money wallets through an API?”
  • “Is there an M-Pesa gateway that settles in USDT instead of Kenyan shillings?”

Why does a Kenyan checkout need M-Pesa first?

M-Pesa is Safaricom’s mobile money service, and in Kenya it is the default way to move money: paying shops, sending money to family, receiving wages. It is widely used by adults, many of whom rarely pay by card online.

For an online business, this sets the starting point. If a Kenyan customer sees only a card form, many ready buyers may abandon the payment. With M-Pesa at the top, priced in Kenyan shillings (KES), the customer pays with a service they use routinely. More on the M-Pesa method page.

What happens during an online M-Pesa payment, step by step?

Consider a viewer in Nairobi buying 1,000 KES of live-stream coins on your site. Through KaazPay the payment runs like this:

  1. 1The viewer selects M-Pesa and enters the Safaricom number linked to their wallet.
  2. 2Your backend creates a pay-in order through the KaazPay API for 1,000 KES, with a unique order ID.
  3. 3A payment prompt appears on the viewer’s phone showing the amount and the payee name.
  4. 4The viewer enters their M-Pesa PIN on the handset to approve.
  5. 5KaazPay sends your server a signed notification with the final status; you verify it and credit the coins.

Nothing sensitive passes through your page: the approval and the PIN stay on the customer’s own phone.

Why do M-Pesa payments go unapproved, and how do you recover them?

A push payment depends on the customer acting on their phone within a short window. When that does not happen, the order ends as failed or expired. The common causes are well known:

CauseWhat happensHow to recover
Number typed in the wrong formatThe prompt goes nowhereAccept both 07… / 01… and 254… formats and normalise them before sending
Prompt missed or phone lockedThe prompt times outTell the customer to watch their phone and offer a “send again” button
Not enough balanceThe customer cannot approveShow a clear failure message and let them retry after topping up, or switch to a card
Customer taps pay twiceTwo prompts, risk of double chargeDisable the button while waiting and reuse the same order ID
Browser closed while waitingCustomer does not see the resultRely on the server notification and show the status when they return

Swipe to see the whole table →

A clear waiting screen prevents most of these issues: the amount, the phone number used, a countdown and a retry option.

Where do Kenyan cards fit next to M-Pesa?

Cards are a useful secondary option rather than the primary method. Some Kenyan customers, especially those buying higher-value items from a laptop or paying with a company card, prefer to pay by card. KaazPay supports Kenya Cards for pay-in in the same integration, reported in the same dashboard.

M-PesaKenya Cards
How the customer paysApproves a prompt on their phone with a PINEnters card details at checkout
What your page collectsPhone numberCard details through the payment page
Typical buyerMobile-first, everyday and small purchasesCard holders, desktop and larger orders
Role on KaazPayPay-inPay-in

Swipe to see the whole table →

Lead with M-Pesa, keep cards one tap away, and use your own data to decide whether to change that order.

How do you send payouts in Kenya?

Kenya is a two-way market on KaazPay. From the same merchant account that collects M-Pesa and card payments, you can send KES payouts to:

  • Mobile money wallets, which suit individuals such as players cashing out, creators collecting earnings or customers receiving refunds.
  • Kenyan bank accounts, which suit suppliers, business partners and larger transfers.

Payouts run singly or in batches, and each payout returns its own status, so balances update without manual checks. Validate the recipient’s phone number or account details before submitting to prevent rejections. For running payouts at scale, see mass payouts in emerging markets; for choosing between wallet and bank payouts, see mobile money vs bank transfer in Africa.

How are Kenyan shilling collections settled?

Customers pay in KES, and KaazPay settles the equivalent amount to you in USDT. You do not need a Kenyan bank account to receive the money.

Settlement timing is channel by channel: many KaazPay channels settle D+0, others D+1 or later, and your account manager confirms the cycle, rate and fees for each Kenyan channel before go-live. Read the USDT settlement guide for details.

What should you prepare before going live in Kenya?

  • Phone number validation and normalisation for Kenyan numbers.
  • A waiting screen with countdown, retry and a fallback to cards.
  • Signature verification and idempotent order updates on every notification.
  • Recipient validation for wallet and bank payouts.
  • Settlement cycle, rates and fees for Kenya confirmed in writing.

For other African markets, the Africa mobile money guide lists what is available country by country.

How to start accepting M-Pesa with KaazPay

  1. 1Open a merchant account and tell us about your product and expected Kenyan volumes.
  2. 2Get your API keys from the merchant dashboard.
  3. 3Integrate with engineering support using the developer documentation, testing M-Pesa, cards and payouts.
  4. 4Go live in Kenya and track results by method in one dashboard.

Every Kenyan channel is listed on the Kenya market page. For a channel plan, settlement terms and pricing, contact our business team on Telegram through the contact page; we reply within one business day.

Frequently asked questions

Yes. KaazPay offers M-Pesa pay-in in Kenya through the same API used for its other markets. Customers pay in KES and you receive the equivalent in USDT.

A phone with an active M-Pesa wallet and enough balance. They approve the payment on the handset with their M-Pesa PIN; no card is needed.

Common causes are a phone number entered in the wrong format or a prompt that timed out while the phone was locked. Validate the number and offer a resend.

Yes. KaazPay supports Kenyan payouts to mobile money wallets and to bank accounts, as single or batch payouts with a status for each.

It depends on the channel. Many KaazPay channels settle D+0 and others D+1 or later; the cycle for Kenya is confirmed before go-live.

Add these methods to your checkout

Send your markets and volumes to our team on Telegram. We reply within one business day and prepare a channel plan with settlement cycles and pricing. One integration covers pay-in, payouts and USDT settlement.

Read next

View all