The verdict in three sentences
A customer can close the tab, lose signal, or return to your page without having paid: the browser redirect is never proof of payment. The single source of truth is the signed webhook sent by Wave or Paystack straight to your server, verified with an HMAC-SHA256 signature. Accept the webhook into a queue, return 200 in under 5 seconds, then process the order asynchronously.
Why the browser redirect lies
The redirect_url is for user experience, not accounting. Three scenarios break client-side validation: the customer pays but never returns (3G drop), the customer returns without having paid (back button), or a bot replays the success URL. The webhook, in contrast, travels from the payment server to yours, independent of the browser.
| Signal | Reliable? | Role | Risk if used alone |
|---|---|---|---|
| Browser redirect | No | UX / show a message | Phantom order, fraud |
| Signed webhook | Yes | Source of truth | None if signature verified |
| API status polling | Yes | Fallback if webhook lost | Server load, latency |
| Confirmation email | No | Information | Forgeable |
| Merchant balance (dashboard) | Yes | Reconciliation | Delayed (T+1) |
The webhook + queue architecture
The winning pattern in 2026 is five steps: receive, verify the signature, deduplicate by event_id, return 200 immediately, process in the background. If processing fails, Wave and Paystack replay the event — hence the need for idempotency.
| Parameter | 2026 value | Detail |
|---|---|---|
| Signature algorithm | HMAC-SHA256 | Webhook secret key from dashboard |
| Paystack header | x-paystack-signature | Hash of raw body |
| Event to process | charge.success | Ignore the rest |
| Clock tolerance | 5 min | Reject stale timestamps |
| Response deadline | < 5 s | Otherwise provider retry |
| Retry count | Up to 5 | Exponential backoff |
| Deduplication | By event_id | 72 h TTL |
| Body to hash | Raw payload | Never re-serialized JSON |
Golden rule: compute the signature over the raw request body, not the re-parsed JSON object — a single space or a different key order invalidates the hash.
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
Mini case study
Awa, who runs a cosmetics shop in Dakar, handled 320 orders/month via Wave and confirmed on the browser redirect. The result: 11 phantom orders/month (customers gone before paying) and 4 disputes. After switching to signed webhook + queue, she drops to 0 phantom orders. On an average basket of 18,000 FCFA, she regains certainty over 320 × 18,000 = 5,760,000 FCFA/month of flow, never again shipping an unpaid order.
FAQ
Must I verify the signature on every webhook? Yes, without exception. An unsigned webhook or one with an invalid signature must be rejected with a 401 and never processed. It is the only barrier against an attacker faking a charge.success.
What if my server is slow? Return 200 in under 5 seconds after merely enqueuing the event. Do no heavy work (email, stock update) before the 200, or the provider treats the call as failed and replays up to 5 times.
What about a duplicate event? Deduplicate by event_id with a 72 h TTL: if the ID was already processed, return 200 and do nothing. Roughly 0.5 to 2 % of webhooks are legitimate replays.
Can the webhook arrive before the browser redirect? Yes, very often. Your success page must query the real order state, not assume it is paid because the user came back.
How do I test locally? Use a tunnel (like ngrok) and the Paystack/Wave dashboard replay tool to resend a real charge.success, then verify the signature with your test key.
Let's talk about your project. We wire your Wave and Paystack webhooks with verified signatures, a queue and idempotency, tested end to end. WhatsApp +221 77 596 93 33.
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.

