E-commerce11 min read

M-Pesa STK Push Timeout & Retry Handling for Kenyan Checkouts (2026)

Mohamed Bah·Fondateur, Kolonell
August 11, 2026
Share:
M-Pesa STK Push Timeout & Retry Handling for Kenyan Checkouts (2026)

M-Pesa STK Push Timeout & Retry Handling for Kenyan Checkouts (2026)

E-commerce

The verdict in three sentences

In Kenya, M-Pesa STK Push callbacks are not 100 % reliable: network drops, cancelled prompts and operator timeouts push STK abandonment near 30 % and lose a share of confirmation callbacks. Every lost callback = an order potentially paid but stuck. The fix: an exponential retry paired with cron reconciliation that recovers 60 to 80 % of ambiguous payments.

Why callbacks fail

Mobile money is an asynchronous flow crossing several networks. The break points:

  • Unstable customer network: the phone drops connection during the STK prompt.
  • Cancelled prompt: the customer dismisses without confirming (ResultCode 1032).
  • Operator timeout: ~60 s with no response (ResultCode 1037).
  • Lost callback: your server never receives the confirmation URL hit.

An order can be paid on the customer side but unconfirmed on the merchant side. That is the worst case: the customer paid, you recorded nothing.

Exponential retry strategy (2026 order of magnitude)

AttemptDelay before retryTarget
115 sfast callback
245 sslow network
32 minoperator congestion
Cron24 h windowpermanently lost callback

Beyond 3 immediate attempts, no infinite loop: the transaction moves to the reconciliation queue polled by cron every few minutes for 24 h. Use the C2B validation and confirmation URLs plus a status query on Daraja.

Recovery rate by strategy

StrategyAmbiguous payments recoveredOrders permanently lost
None (callback only)0 %8 to 15 %
Simple retry x340 to 55 %4 to 8 %
Retry + cron 24 h60 to 80 %2 to 4 %
Retry + cron + status query80 to 90 %< 2 %

Estimates for 2026. The winning combo (retry + cron + status query) drops loss below 2 %, versus double digits with nothing.

Mini case study

Joseph runs an online textile shop from Nairobi, with many customers in semi-urban areas. He handles 200 orders/month, average basket 2,200 KES, i.e. 440,000 KES revenue.

Need a professional website?

Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.

Without a strategy: ~10 % lost callbacks = 20 orders/month ambiguous = 44,000 KES in limbo, roughly half turning into hard losses after refunds. With retry + cron: he recovers 75 % of these, i.e. 15 orders = 33,000 KES/month saved. Over a year that is ~396,000 KES of revenue secured that was previously partly lost.

FAQ

Why not just replay the callback forever?

Because infinite retries overload your server and the Daraja API. Three immediate attempts then a 24 h cron capture almost every case without a useless loop.

Can the customer be charged twice?

No, if you use a unique idempotent transaction id. The status query checks the existing state instead of creating a new STK request, avoiding a double charge.

How long should a transaction stay in reconciliation?

A 24 h window covers nearly all late callbacks. Beyond that, the transaction is marked failed and the cart released.

Is the failure rate the same everywhere?

No. In dense urban areas it often falls below 5 %; in semi-urban areas it climbs to 8-12 % due to weak networks. Retry logic matters most for rural-leaning customers.

Does this work for Airtel Money too?

Yes, the principle (exponential retry + cron + status query) is provider-agnostic. Only the result codes and endpoints change per operator.

Let's talk about your project. We harden your M-Pesa STK Push callbacks with retry, cron and status queries to recover your ambiguous payments. WhatsApp +221 77 596 93 33.

Tags:#M-Pesa STK push#payment timeout#retry#Kenya#Orange Money#Mali#Burkina Faso#webhook reliability
Share:

Mohamed Bah

Fondateur, Kolonell

Passionate about digital and entrepreneurship in Africa, Mohamed has been helping Sénégalese businesses with their digital transformation since 2020. Founder of Kolonell, he believes every SME deserves a professional and accessible online présence.