Skip to content
M-Pesa & Payments

Why Your Kenyan Business Needs an M-Pesa Integrated Website in 2026

8 min read

On this page
  1. What "M-Pesa integration" actually means
  2. How STK push works
  3. Till number or Paybill: which do you need?
  4. What you need before integration starts
  5. What an M-Pesa website costs in 2026
  6. Common mistakes we see
  7. Receipts, records and tax
  8. Customer data and the Data Protection Act
  9. Which businesses benefit most
  10. A simple plan to get started
  11. Talk to us about an M-Pesa website

In Kenya, M-Pesa is how most people pay for things. Customers pay for lunch, rent, school fees and electricity from their phones every day. Yet many business websites still end with "call us to order" or a Paybill number in small print, and leave the customer to do the rest.

An M-Pesa integrated website closes that gap. The customer chooses what they want, enters their phone number and approves the payment with their M-Pesa PIN. Your website knows the payment has gone through without anyone checking a statement. This guide explains how that works, what you need from Safaricom, what it costs and the mistakes to avoid.

What "M-Pesa integration" actually means

There are two very different things people call M-Pesa on a website:

  • Showing your Paybill or Till number. The customer leaves your site, opens the M-Pesa menu, types the number and the amount, and sends you the confirmation message. Someone on your side then matches that message to an order. This is not integration. It is a manual process on a web page.
  • A real integration through Safaricom's Daraja API. Your website talks to M-Pesa directly. It can send a payment request to the customer's phone, receive confirmation automatically and mark the order as paid.

The second option is what this article is about. Daraja is Safaricom's developer platform. It is how websites, apps and business systems connect to M-Pesa.

How STK push works

STK push (Safaricom also calls it Lipa Na M-Pesa Online or M-Pesa Express) is the most familiar experience for customers. It works like this:

  1. The customer checks out on your website and enters their Safaricom number.
  2. Your website sends a payment request to Daraja with the amount and a reference, such as the order number.
  3. A prompt pops up on the customer's phone showing your business name and the amount.
  4. The customer enters their M-Pesa PIN to approve.
  5. Safaricom sends the result to a secure address on your website, called a callback URL.
  6. Your website marks the order as paid, sends a receipt and tells your team.

The customer never types a Paybill number or an account reference, so there are fewer mistakes. Your team never has to match a payment to an order by hand.

What about customers who pay manually?

Some customers will still pay through the M-Pesa menu, especially for invoices and repeat payments. Daraja's C2B (customer to business) service handles this too. You register a confirmation URL with Safaricom, and every payment to your Paybill or Till is sent to your system as it happens. If the customer used the right account reference, the system can match it to their invoice automatically. A good integration supports both routes.

Till number or Paybill: which do you need?

Both work with Daraja, but they suit different businesses.

  • Till number (Buy Goods). The customer pays the Till with no account number. This suits shops, restaurants and simple online sales where every payment is a one-off purchase. With STK push, the order reference is carried by your system, so the lack of an account number matters less.
  • Paybill. The customer enters an account number as well as the business number. This suits anything where you need to know who or what the payment is for: school fees, rent, loan repayments, subscriptions and invoices. The account number is what lets your system match manual payments automatically.

If most of your payments are tied to an account, invoice or customer record, choose a Paybill. If you sell goods over the counter and online, a Till is usually enough. Your bank or Safaricom can advise on which account type suits your business registration.

What you need before integration starts

Most delays in M-Pesa projects are paperwork, not code. Before development starts, have these ready:

  • An active Paybill or Till number registered to your business, not to a personal line.
  • Access to the M-Pesa organisation portal for that shortcode, with an administrator who can approve requests.
  • Business registration documents, because Safaricom checks who owns the shortcode before it allows a live integration.
  • A website on proper hosting with SSL. Safaricom's callbacks must reach a secure, public HTTPS address. A site on a free builder subdomain will not do.

Development and testing happen first on Safaricom's sandbox, which uses test credentials and no real money. When everything works, you apply to "go live" on the Daraja portal and Safaricom issues production credentials for your shortcode.

What an M-Pesa website costs in 2026

At Edgecom, M-Pesa or card payments are an add-on to any website. In our quote builder the integration is KES 8,000 before VAT, on top of the site itself. A business website starts from KES 20,000 and an online store from KES 45,000, both before 16% VAT. Our website cost guide breaks down every price and the yearly costs for domain and hosting.

Separately, Safaricom charges its normal transaction fees on payments to your shortcode. These depend on your account type and tariff, so check the current rates with Safaricom.

Common mistakes we see

1. Trusting the browser instead of the callback

Some integrations mark an order as paid as soon as the STK prompt is sent. That is wrong. The customer might cancel, enter the wrong PIN or have too little balance. An order should only be marked paid when Safaricom's callback confirms a successful transaction. Your site should also check that the amount and reference match what was expected.

2. No plan for unmatched payments

Customers will sometimes pay manually with a typo in the account number. If your system silently ignores those payments, you will have angry customers and money you cannot place. A good system holds unmatched payments in a list for a person to review, rather than guessing or dropping them.

3. Credentials in the wrong place

Daraja consumer keys and passkeys give access to your payment account. They should be stored securely on the server, never in the website's front-end code, an email thread or a shared document.

4. Forgetting about reversals

Refunds and reversals happen. Your system should record them as their own transactions so the history stays complete, rather than deleting the original payment.

Receipts, records and tax

Automatic payments are only half the job. The other half is records your accountant can use.

  • Receipts. Send each customer a receipt by email or SMS with the M-Pesa transaction code, the amount and what it was for.
  • Reports. Your team should be able to export payments by date, matched to orders or invoices, for month-end reconciliation.
  • KRA eTIMS. Kenyan businesses are required to issue electronic tax invoices through KRA's eTIMS system. A website payment does not replace that. Plan with your accountant how online sales will be invoiced in eTIMS, whether by hand or through an integration with your invoicing system.

Customer data and the Data Protection Act

An M-Pesa checkout collects phone numbers, names and purchase history. Under Kenya's Data Protection Act, 2019, that is personal data. You need a clear privacy notice that explains what you collect and why, you should collect only what you need, and you must keep it secure. Some businesses also need to register with the Office of the Data Protection Commissioner (ODPC) as a data controller or processor. If you are unsure whether that applies to you, check the ODPC's guidance or ask a lawyer.

Which businesses benefit most

Almost any business that takes payment can use M-Pesa online, but some see the clearest gains:

  • Online shops, where a smooth checkout decides whether the sale happens. See our notes on websites for online stores.
  • Schools and colleges collecting fees by Paybill, where matching payments to students by hand takes days every term.
  • Hotels, salons and clinics taking deposits for bookings, so no-shows cost less.
  • Landlords and property managers collecting rent from many tenants.
  • Service businesses that invoice clients and want payments to clear the invoice automatically.

A simple plan to get started

  1. Decide what customers pay for online: products, deposits, invoices or subscriptions.
  2. Confirm you have the right Paybill or Till, registered to the business.
  3. List what should happen after payment: receipt, stock update, booking confirmation, staff alert.
  4. Agree how unmatched payments and refunds will be handled.
  5. Build and test on the sandbox, then apply to go live.
  6. Run a few real low-value payments before announcing it to customers.

Talk to us about an M-Pesa website

We build websites and systems with M-Pesa built in, for businesses in Nairobi and across Kenya. Have a look at our web development service, or our web development page for Nairobi. When you are ready, use the quote builder or contact us and we will send a fixed-scope, itemised quote within one business day.

Ready to build something great?

Tell us what you need. We'll come back with a fixed-scope proposal within one business day.

Start a conversation
Chat with us