How do I accept M-Pesa payments on my website or app?

By Bonaventure Ogeto, Founder and CEO, Mctaba Labs
Published

The short answer

You accept M-Pesa online in one of three ways: show a Till or Paybill number and confirm payments by hand, connect your own Till or Paybill to Safaricom's Daraja API so customers get a PIN prompt, or use a payment gateway that does the connecting for you. Start with a gateway unless you already hold a Paybill.

A customer is on your checkout page with KES 2,000 worth of goods in the basket. If the page says "send money to 07XX and WhatsApp us the code", some of them will do it, and you will spend your evenings matching codes to orders. If a prompt appears on their phone and all they do is enter a PIN, more of them will finish paying, and the order marks itself as paid.

Both of those are "accepting M-Pesa". The difference between them is a business decision before it is a technical one: which account the money lands in, whose name is on it, and who does the connecting.

What are the ways to accept M-Pesa on a website or app?

There are three, and they are steps on the same ladder.

1. Show a number and confirm by hand. You put a Till number or Paybill number on the page. The customer pays from their phone and you check your messages or statement, then mark the order as paid yourself. No developer is needed. It works for the first few dozen orders and breaks when volume grows or when two people pay the same amount on the same day.

2. Connect your own Till or Paybill to Safaricom directly. Safaricom's developer platform is called Daraja. Through it, your site can send a payment prompt to the customer's phone and receive a confirmation the moment they pay. The money lands in your own Till or Paybill.

3. Use a payment gateway. A gateway such as Paystack or Flutterwave holds the connection to Safaricom. Your site talks to the gateway, the customer still gets an M-Pesa prompt, and the gateway pays the money out to your bank account or M-Pesa on a schedule. You also get cards and other methods through the same connection.

What does the customer see when it is done properly?

They type their phone number, a prompt appears on the phone asking them to confirm the payment, and they enter their M-Pesa PIN. That is all.

Safaricom calls this service M-Pesa Express, also known as Lipa na M-Pesa Online. Most developers call it an STK push. Safaricom's own documentation describes the benefit plainly: the customer does not have to remember a Paybill or Till number, an amount or an account number, because the business sets those in the request. Fewer wrong payments means fewer reversals for you to chase.

After the customer enters the PIN, Safaricom debits their wallet, credits your account, sends them the usual SMS, and sends your system a result. That result is the only thing your product should trust. A screenshot from a customer is not a payment.

What does Safaricom need from my business to go direct?

Two things: a live M-Pesa business account, and a named person who can administer it.

Safaricom's documentation for M-Pesa Express lists a "live M-PESA pay bill/till number" with a Business Administrator or Business Manager operator as the requirement for going live. In plain terms, you cannot connect a number you do not own, and somebody at your business must hold a login to Safaricom's M-Pesa organisation portal. The same documentation says access to that portal requires the account's settlement option to be set to bank, through what Safaricom calls a Head Office application. Ask for this when you apply, not after the build is finished.

What you submit depends on how the business is registered. This is the 2026 requirements checklist that Safaricom links from its account opening page, in short form:

You are What Safaricom asks for What you can open
An individual with no registered business Signed application form and terms, copy of your ID. For settlement to a bank, add your KRA PIN certificate and a cancelled cheque or bank statement Buy Goods Till only
A sole proprietor The above, plus the business registration certificate or business permit. For bank settlement, the owner's KRA PIN and bank details Till or Paybill
A limited company Certificate of incorporation, a company search (CR12) not older than 90 days, company KRA PIN, KRA PINs and IDs for directors, shareholders and beneficial owners, the beneficial ownership form, an authorisation form or minutes signed by at least two directors, and bank details that match the company name Till or Paybill

Three notes from the same checklist catch founders out:

  • Online businesses must provide a company profile and an active website or link. Have at least a simple page live before you apply.
  • If you trade under a name different from the registered one, you need a trade name certificate.
  • A Paybill application needs a signed tariff guide, which is where you choose who bears the transaction charge.

Applications go through Safaricom's Lipa na M-Pesa application portal. As of 19 November 2026, Safaricom says Till applications in the Individual category are processed within 10 minutes and other categories within 24 hours, and that Paybill applications are processed within 24 hours of submitting all the documents.

What does a gateway need instead?

Less. You open an account online, upload documents, and your developer connects once.

Paystack publishes its Kenyan requirements. An unregistered "Starter" business needs a government ID and a personal bank account or mobile money number in the same name. A registered sole proprietor needs the registration certificate, a KRA PIN and a bank account that matches. A company needs the certificate of incorporation, the CR12, the company KRA PIN and a corporate bank account in the company name. You do not need your own Till or Paybill, because the gateway collects on its own and settles to you.

The trade is cost and timing. A gateway takes a percentage of each payment and pays you later instead of instantly.

How does the money reach me, and what does it cost?

This is the part to read on the official pages yourself, because fees change. The table gives the shape of it as of 19 November 2026.

Route Where the money lands When you can use it What it costs you
Your own Business Till In the Till Straight away. You can withdraw to your nominated number, to the bank or at an agent Up to 0.55% of each payment, never more than KES 200. Payments of KES 200 and below are free
Your own Paybill In the Paybill Withdrawn to the one bank account you gave when applying A banded charge per payment, on you, on the customer, or split, depending on the tariff you chose
Paystack With the gateway, then your bank or M-Pesa Two working days after the payment 1.5% of each M-Pesa payment, with no setup or monthly fee
Flutterwave With the gateway, then your account The next day for local payments 2.9% of each mobile money payment, before VAT

M-Pesa's own limits apply whichever route you choose. A customer has a limit on each transaction and a limit for the day, so check Safaricom's current limits before you price anything above KES 250,000. If you sell something that costs more than the limit, plan for instalments, bank transfer or cards.

For the cost of the build itself, as opposed to the transaction fees, there is a separate breakdown in what it costs to integrate M-Pesa into a business.

Which route should I choose?

Use the number-and-confirm method while you are still testing whether anyone will pay. It costs nothing to set up and you will learn a lot from handling the first orders yourself.

Move to a gateway when orders are regular and you are building a real product. You get the PIN prompt, cards for customers outside Kenya, and one dashboard, with the fewest documents. For most first versions this is the right answer.

Go direct to Daraja when one of these is true: you already have a Paybill that customers know, your volumes are large enough that the gap between Safaricom's charge and a gateway's percentage is real money every month, or you need the money in your own account immediately. Going direct is more work for your developer and more administration for you.

You can change later. Founders often launch on a gateway and add a direct connection once the numbers justify it.

What should I ask my developer to build?

Whichever route you take, the same six things separate a payment feature that works from one that loses money. Use this as a checklist when you agree the scope.

  1. Payment is confirmed by the server, not the screen. The order is marked paid only when Safaricom or the gateway sends the result.
  2. Every payment is tied to one order. Each request carries a reference so that two customers paying KES 500 at the same minute cannot be confused.
  3. A retry path. Prompts time out and customers cancel by mistake. There should be a "try again" button and a fallback showing your Till or Paybill number.
  4. A record you can read. A simple admin page listing each payment, its M-Pesa receipt number, the order and the status.
  5. Reconciliation. A way to compare what your system recorded with the M-Pesa or gateway statement at the end of each day.
  6. Refunds. Decide who can issue them and through which channel: Safaricom's own tools if the money sits in your Till or Paybill, or the gateway's support process if it does not.

If your developer wants to see what the direct route involves, the Daraja API tutorial for beginners walks through it step by step.

What should I do this week?

Decide the route, then start the paperwork before any code is written. Gather your ID, KRA PIN certificate, registration documents and bank details in one folder. If you are going direct, apply for the Till or Paybill and ask for portal access with bank settlement. If you are using a gateway, open the account and submit the documents. The approval is the only step you cannot speed up, so it should be the first thing you begin.

Key takeaways

  • The PIN prompt customers expect is Safaricom's M-Pesa Express service. You can reach it directly through Daraja or through a gateway.
  • Going direct needs a live Till or Paybill in your business name and someone with an administrator role on Safaricom's M-Pesa portal.
  • A gateway needs fewer documents and less build time, and charges a percentage of each payment for it.
  • Your product must record a payment only when the confirmation arrives from Safaricom or the gateway, never when the customer says they paid.
  • Open the Till, Paybill or gateway account before the build begins, because approval is the step you do not control.

Frequently asked questions

Can I accept M-Pesa on my website without a registered business?
Yes, in two ways. Safaricom's requirements list lets an individual without a registered business apply for a Buy Goods Till with an ID, and Paystack accepts unregistered "Starter" businesses with an ID and a personal bank or mobile money account. A Paybill needs a registered business.
Can I use my personal M-Pesa number to collect payments on my site?
You can show it and ask people to send money, and many founders do this in their first weeks. It cannot be connected to your site, so every payment must be checked by hand, and your personal and business money mix. Move to a Till or a gateway as soon as people are paying regularly.
What is an STK push?
It is the prompt that appears on the customer's phone asking for their M-Pesa PIN. Safaricom's name for the service is M-Pesa Express, also called Lipa na M-Pesa Online. Your site sends the phone number and amount, and the customer only has to enter the PIN.
How long does it take to add M-Pesa to a website?
The approvals usually decide the timeline, not the code. Safaricom says Till applications in the Individual category are processed within 10 minutes and other categories within 24 hours once the documents are complete. After that your developer still has to connect, test and go live.
Do customers pay extra when they pay me by M-Pesa?
It depends on the account. Safaricom says customers are not charged for paying a Business Till, except at fuel stations. On a Paybill you choose a tariff that puts the charge on the customer, on the business, or splits it. Some gateways let you pass their fee to the customer.

Sources

  1. M-Pesa Express Simulate (Lipa na M-Pesa Online API documentation), Safaricom Daraja developer portal. Checked on 19 November 2026.
  2. M-PESA Business Till, Safaricom. Checked on 19 November 2026.
  3. M-PESA Paybill, frequently asked questions, Safaricom. Checked on 19 November 2026.
  4. Lipa Na M-PESA Account Opening (with the 2026 KYC requirements checklist and the Paybill tariff guide), Safaricom. Checked on 19 November 2026.
  5. Pricing for Kenya, Paystack. Checked on 19 November 2026.
  6. Compliance requirements for Kenya, Paystack. Checked on 19 November 2026.
  7. Pricing for Kenya, Flutterwave. Checked on 19 November 2026.