Digital Africa11 min read

Testing payment webhooks from sandbox to production 2026

Mohamed Bah·Fondateur, Kolonell
August 25, 2026
Share:
Testing payment webhooks from sandbox to production 2026

Testing payment webhooks from sandbox to production 2026

Digital Africa

The verdict in three sentences

An untested webhook is a time bomb: it works in demo, then in production it misses an event and the customer pays without the order confirming. The 2026 target is clear: under 0.1% lost events and an alert in under 5 minutes on any unprocessed event. You reach it with a test plan covering replay, failure, signature and monitoring, from sandbox to production.

The 12 test cases before going live

A payment webhook must survive the unexpected: an event received twice, out of order, with an invalid signature, or while your server restarts. Each case has a precise expected result.

#Test scenarioExpected result
1Standard SUCCESS eventOrder confirmed
2Same event received twice (duplicate)Processed once (idempotency)
3Invalid signatureRejected, 401, alert
4FAILED eventOrder marked failed
5Event received out of orderCoherent final state
6Server down during deliveryAutomatic replay succeeds
7Malformed payloadCleanly rejected, logged
8Event for unknown orderQueued / reconciliation
9Latency > 10s server-sideNo loss, operator retry
10Refund (REFUND)Status updated
11Volume: 100 events in a burstNone lost
12Sandbox to prod switchCorrect keys and URLs

Alert SLA and tolerated lost-event rate

In production what matters is knowing fast when an event wasn't processed. Passive monitoring isn't enough; you need an active alert and a reconciliation dashboard.

Indicator2026 targetConsequence if exceeded
Lost events< 0.1%Paid orders unconfirmed
Alert delay on unprocessed event< 5 minCustomer without confirmation, dispute
Mishandled duplicate rate0%Double confirmation / double stock
Legitimate signatures rejected0%Real payments blocked
Reconciliation delay< 24hCash / order mismatch

A daily reconciliation job compares your orders to aggregator transactions: any gap becomes a task to handle, not a silent loss.

Mini case study

David launches a store in Lagos, 600 orders/month. Without idempotency, 1.5% of events arrived duplicated and confirmed the order twice: 9 orders/month in stock disputes, ~45,000 FCFA in lost margin and support time. After the 12-test plan and adding idempotency, the rate drops to 0% duplicates and < 0.1% lost events. Cost: ~150,000 FCFA of dev one-off, against a recurring source of disputes eliminated.

FAQ

Need a professional website?

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

Why does a webhook that works in sandbox fail in production?

Because production adds volume, network latency and real duplicate or out-of-order events. Edge cases that never show in demo become daily in production.

What is idempotency and why is it critical?

It's processing the same event only once, even if received multiple times. Without it, a duplicate confirms the order twice; the target is 0% mishandled duplicates.

How do I know an event was lost?

With a daily reconciliation job comparing orders and aggregator transactions, plus an alert in under 5 minutes on any unprocessed event.

Should I verify the signature of every webhook?

Yes, systematically: an invalid signature must return 401 and trigger an alert. It's the first defence against injected fake events.

What lost-event rate is acceptable?

Under 0.1%, and every missing event must be caught by reconciliation within 24h. Zero silent loss is the goal.

Let's talk about your project. We build your webhooks with idempotency, signature verification, replay and alert monitoring under 5 min. WhatsApp +221 77 596 93 33.

Tags:#test webhook#sandbox paiement#qa paiement#integration#monitoring#fiabilite
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.