The verdict in three sentences
Integrating Paystack into a Lagos merchant checkout rests on initializing a transaction, redirecting the buyer, then a signed webhook that confirms settlement. The golden rule: never confirm an order from the browser, only from the idempotent webhook on your server. Without idempotency, 3 to 5% of orders duplicate during network retries, corrupting your books and stock.
The end-to-end integration flow
The technical journey has five steps. The front creates an intent, the back calls the API to initialize a transaction, the user pays on the hosted page, Paystack redirects to your callback_url, and crucially Paystack calls your webhook to confirm. The business confirmation (marking the order paid) must come only from the webhook.
On fees and timing, the 2026 order of magnitude puts Paystack collection around 1.5% with T+1 settlement. For a francophone merchant, the Wave equivalent runs near 1% with J+1 settlement. The comparison guides the choice by target market.
| Provider | Collection fee | Settlement | Webhook signature | Webhook retry |
|---|---|---|---|---|
| Paystack (NG/GH) | ~1.5% | T+1 | x-paystack-signature | x5 (24h) |
| Flutterwave (NG/pan-Africa) | ~1.4% | T+1 | verif-hash header | x3 |
| M-Pesa (KE) | ~1-1.5% | Same day/T+1 | Confirmation URL | Daraja retries |
| Stripe (international) | 2.9% + fixed | T+2 to T+7 | Stripe-Signature | auto |
Endpoints and error codes to handle
The core of Paystack is POST /transaction/initialize, which returns an authorization_url. A recommended server-side timeout is 30 seconds; beyond that, retry or show a "pending" state. The webhook arrives with a signature header you verify by hashing the raw request body, never the re-serialized JSON.
| Endpoint / event | Role | Code / status | Recommended action |
|---|---|---|---|
| POST /transaction/initialize | Create transaction | 200 + auth_url | Store reference |
| GET /transaction/verify/:ref | Check state | 200 / success | Confirm if webhook missing |
| webhook charge.success | Payment confirmed | you return 200 | Mark order paid (idempotent) |
| signature mismatch | Security | you return 401 | Reject, log, alert |
| abandoned transaction | Timeout 30s+ | abandoned | Re-show the cart |
| insufficient funds | Wallet refusal | failed | Offer another method |
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
Chidi, developer for a sneaker store in Lagos (Lekki), processed 600 orders a month. Before idempotency, about 4% — 24 orders — duplicated during mobile network drops, forcing manual refunds costing roughly ₦15,000 each in handling. By adding a unique reference key with 24h TTL dedup and confirming only via webhook, duplicates fell to 0. Estimated saving: about ₦360,000/month in time and avoided refunds, from an integration delivered in 4 days.
FAQ
Should I confirm the order from the callback page? No. The callback_url only shows a message. Business validation (stock, invoice, email) must come from the server webhook, the only reliable source, since a customer may close the tab before the redirect.
How do I avoid double charges? Generate a unique reference per order and store each processed webhook with a 24h TTL. If the same reference returns, respond 200 without reprocessing. This neutralizes the 3-5% of duplicates seen on retries.
What timeout should I set server-side? 30 seconds for the initialize call. If Paystack doesn't answer, show a "pending" state and let the webhook decide rather than forcing an immediate second attempt.
Paystack or Flutterwave for multi-country? Paystack at ~1.5% with T+1 is strong for Nigeria and Ghana. Flutterwave at ~1.4% offers broader pan-African rails. Many merchants wire both behind a unified module.
How do I test without real money? Use the provider sandbox and simulate webhooks with locally signed payloads. Explicitly test receiving the same webhook twice to validate idempotency.
Let's talk about your project. We integrate Paystack, Flutterwave and Wave into your checkout with signed, idempotent webhooks, 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.

