E-commerce11 min read

Payment Webhook Reliability and Retry Strategy in Nairobi (2026)

Mohamed Bah·Fondateur, Kolonell
August 1, 2026
Share:
Payment Webhook Reliability and Retry Strategy in Nairobi (2026)

Payment Webhook Reliability and Retry Strategy in Nairobi (2026)

E-commerce

The verdict in three sentences

A missed or duplicated webhook means either a paid order never shipped or a customer served twice — and on M-Pesa and Airtel Money in Nairobi, 2 to 5 % of notifications cause trouble. The fix rests on three pillars: idempotency (process each ID once), exponential retry (5 attempts over 24 h) and HMAC signature (reject fakes). Done right, this trio pulls order loss below 0.1 %.

Webhook problems and their frequency

Before fixing, measure. Here are typical mobile money webhook incidents in Nairobi, 2026 orders of magnitude.

ProblemRaw frequencyConsequenceFix
Duplicate notification2 - 4 %Double processingIdempotency (unique ID)
Delay > 30 s3 - 5 %Order stuck pendingAsync queue
Lost notification1 - 2 %Payment unseenRetry + polling
Fake webhookRarePossible fraudHMAC signature
Server timeout2 - 3 %Provider re-sendsFast 200 response

Retry strategy and target delays

A good retry doesn't hammer the server: it spaces attempts. Here is a reference strategy and the delays to aim for.

ParameterTargetNote
Attempts5 over 24 hExponential backoff
Intervals1 min, 5, 30, 2 h, 12 hProgressive
P95 processing delay< 5 sM-Pesa Daraja requirement
Provider ACK response< 2 sElse re-send
Target loss rate< 0.1 %After idempotency + retry
Event retention30 daysTo replay if needed

Mini case study

Wanjiru, who runs an online grocery in Nairobi, collected via M-Pesa and Airtel Money. Without an idempotent queue, about 4 % of her 900 orders/month (36 orders) were either duplicated or stuck pending — an estimated ~540,000 KES/month cost between disputes, refunds and missed deliveries (15,000 KES average basket). After deploying an idempotent queue + exponential retry + HMAC signature, the incident rate dropped to 0.1 % (under one order/month). Loss nearly eliminated, support team relieved.

Need a professional website?

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

FAQ

What is webhook idempotency?

It guarantees the same transaction ID is processed only once, even if the provider sends the notification two or three times. You store the ID and ignore any repeat — no more double shipments.

Why exponential retry instead of fixed?

Because an incident is often transient (server briefly unavailable). Spacing attempts (1 min, 5, 30, 2 h, 12 h) gives the system time to recover without overloading it.

What is the HMAC signature for?

It proves the webhook truly comes from the provider and wasn't forged. Without it, a fraudster could fake a payment and trigger an unpaid shipment.

What does M-Pesa Daraja require on timing?

Daraja requires validating the notification in under 5 seconds, or the request times out and is re-sent. Hence the need for a fast ACK and asynchronous queue processing.

Let's talk about your project. We harden your M-Pesa, MTN and Airtel webhooks with idempotency and retry so you never lose an order. WhatsApp +221 77 596 93 33.

Tags:#payment webhooks#mtn momo#m-pesa daraja#idempotency#payment retry#payment reliability#api integration#online payment
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.