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.

Talk to MobiWave Open API documentation
Checklist

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

Step by Step

How to do it in Kenya

A practical, compliance-aware walkthrough you can follow today.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Comparison

How the options compare

The factors that matter for a Kenyan organisation deciding between providers.

FactorMobiWaveAfrica's TalkingCelcom AfricaTwilio
Native Daraja STK PushYes — nativeYesYes (reseller)Limited / not native
Callback / reconciliationDashboard + webhookWebhookWebhookN/A
Trigger from USSD / SMSYes, bundledAdd-onAdd-onNo
Setup feeFree (Daraja)FreeFreeN/A
Local 24/7 supportPhone + WhatsAppDeveloper-onlyBusiness hoursNo 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.

Frequently Asked Questions

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.

Ready to get started with M-Pesa STK Push API in Kenya?

Talk to our team about the fastest, compliant path for your organisation.

Office Hours

Monday-Friday, 9am-5pm