M-Pesa STK Push API in Kenya
How Lipa Na M-Pesa STK Push works — the 2026 guide
STK Push (officially Lipa Na M-Pesa Online) is the pop-up a customer gets on their phone to enter their M-Pesa PIN and pay. This guide explains how the Daraja API STK Push flow works in Kenya, what you need to integrate it, typical use cases, and how MobiWave bundles it with SMS, USSD and WhatsApp on one account.
Last updated August 2026
STK Push is the single highest-conversion payment method for Kenyan businesses because the customer never leaves their phone or types a paybill number — the prompt appears, they enter their PIN, and you get a real-time callback. If you sell online, run a SACCO, or collect dues, this is the flow to implement first.
Before you start
Registered Kenyan business with KRA PIN
Active Safaricom paybill or till number
Daraja app (consumer key + secret) and shortcode
A public CallbackURL Safaricom can reach
A plan for reconciling incoming payments
Customer consent and receipt messaging
How to do it in Kenya
A practical, compliance-aware walkthrough you can follow today.
Register your Daraja app
Create a Safaricom Daraja application linked to your business, KRA PIN and paybill/till. Daraja registration is free — there is no setup fee to integrate M-Pesa.
Get keys and the shortcode
Obtain your consumer key, consumer secret and the Lipa Na M-Pesa shortcode, then configure the CallbackURL where Safaricom posts every transaction result.
Trigger STK Push
When a customer checks out, call the STK Push API with their phone number, amount and reference. Safaricom pushes the PIN prompt to their handset instantly.
Customer enters PIN
The customer enters their M-Pesa PIN on the SIM pop-up. No app, no internet beyond the standard M-Pesa session. They see a confirmation from Safaricom.
Receive the callback
Safaricom posts the result (success, cancelled or failed) to your CallbackURL in real time. MobiWave also surfaces it in the reconciliation dashboard.
Reconcile and notify
Match the payment to the order or invoice, then send an SMS or WhatsApp receipt from the same MobiWave account. Failed attempts are flagged for retry.
How the options compare
The factors that matter for a Kenyan organisation deciding between providers.
| Factor | MobiWave | Africa's Talking | Celcom Africa | Twilio |
|---|---|---|---|---|
| Native Daraja STK Push | Yes — native | Yes | Yes (reseller) | Limited / not native |
| Callback / reconciliation | Dashboard + webhook | Webhook | Webhook | N/A |
| Trigger from USSD / SMS | Yes, bundled | Add-on | Add-on | No |
| Setup fee | Free (Daraja) | Free | Free | N/A |
| Local 24/7 support | Phone + WhatsApp | Developer-only | Business hours | No local team |
All routes use Safaricom’s official Daraja API; transaction charges follow Safaricom’s published tariff and are separate from any integration fee. Twilio is not a native Daraja reseller in Kenya.
M-Pesa STK Push API in Kenya questions, answered.
The practical questions Kenyan organisations ask about m-pesa stk push api in kenya, with straight answers and KES pricing where it applies.
Still have a question? Talk to us →STK Push (Lipa Na M-Pesa Online) is the API call that makes the M-Pesa PIN-entry pop-up appear on a customer’s phone. They enter their PIN to authorise payment, and you receive a real-time result callback.
Related resources
Talk to our team about the fastest, compliant path for your organisation.