← Payment gateway integration services

JZ Tech / Engineering guide

Payment gateway integration: a launch checklist.

What to verify between checkout, payment confirmation and fulfilment—with practical notes for Razorpay, Hubtel, Paystack and Network International.

This is an engineering reference and test plan. The provider notes are based on the linked official documentation; the workflow is our suggested design. No merchant sandbox or production transactions were run for this guide.

01 / Confirmation

A checkout return is only one part of the journey.

A customer can finish paying and close the browser before your site opens again. Your backend needs its own route to the outcome. Keep an internal order reference and a separate reference for each payment attempt, then match the provider result to that attempt before taking a business action.

Paystack recommends verifying a transaction before delivering value and checking its amount. Its verification response also separates the API request status from the transaction status. A successful API request alone does not mean the customer paid. Paystack payment verification.

  1. 1 Create order
  2. 2 Open checkout
  3. 3 Verify result
  4. 4 Record & fulfil

Give the customer a useful pending state while confirmation is unresolved. A retry should create or reuse the appropriate payment attempt according to the provider's rules; it should not silently create a second order.

02 / Provider differences

Check the contract for each gateway.

A shared integration layer can simplify your application, but notification authentication, event identifiers and retry behaviour belong in provider-specific adapters. Confirm availability for your merchant country and account before choosing a gateway for India, an African market or the UAE.

India

Razorpay

Validate X-Razorpay-Signature using the raw request body and webhook secret. Use x-razorpay-event-id to identify duplicate events. Events can arrive out of order. When rotating secrets, account for older requests retried with the previous secret.

Razorpay webhook validation ↗
Ghana

Hubtel

Hubtel's official Android checkout SDK requires a backend callback URL and a unique client reference. Preserve that reference across checkout and your order records. Confirm callback authentication and status-query behaviour for the specific Hubtel API you use; those details are not established by the SDK overview alone.

Hubtel's official checkout SDK ↗
African markets

Paystack

Paystack documents an x-paystack-signature header using HMAC SHA-512. Verify authenticity before processing, and follow its documented acknowledgement and retry rules. Confirm the transaction through its verification API before delivering value.

Paystack webhook documentation ↗
UAE / N-Genius Online

Network International

N-Genius documents one delivery per event with no retry after failure. It requires HTTP 200 or 201 within 15 seconds, endpoint whitelisting, and a configured secret header for notification authentication. Evaluate the event name, order action and payment state together before fulfilment.

Build recovery for a missed notification instead of waiting for a retry. If webhook encryption is enabled on your merchant profile, implement the separate encryption contract as well.

N-Genius webhook contract ↗N-Genius encryption guide ↗

03 / Processing

Separate receiving an event from fulfilling an order.

For a recoverable design, authenticate the request and store a durable receipt before acknowledging it. Keep the receipt path short enough for the gateway's timeout. Put slower work—inventory updates, invoices, messages and delivery requests—behind that durable record.

Suggested receipt record

Provider + merchant account + environment + event identifier; internal payment reference; event type; received time; processing status; retry count; and a link to restricted diagnostic evidence.

Enforce uniqueness in durable storage, not just with a check in application memory. Two workers can receive the same event at the same time. A unique receipt key prevents duplicate inserts, but it does not finish the job: a worker must be able to resume an accepted receipt after a crash.

Track fulfilment separately with a stable business-operation key. If a stock update succeeds and the worker crashes before recording completion, replay must not decrement stock again. Where the downstream system supports idempotency keys, reuse the same key for retries of that operation. Otherwise design a reconciliation or compensating action for ambiguous outcomes.

Keep payment, refund, settlement and fulfilment states separate. A delayed authorisation should not overwrite a later captured state, and a refund should not erase the original payment record. Unknown event types need an explicit handling path rather than an automatic “paid” fallback.

04 / Recovery

Make unresolved payments visible.

Maintain a pending-payment queue with the last status-check time and a named operational owner. Resolve stale attempts through the provider's authenticated status API or reconciliation reports, respecting its limits and account capabilities. Track exceptions that need a person rather than retrying forever.

Run recovery independently of browser redirects. The customer may never revisit the return URL, and the notification may be missing. Reconcile internal payment records with provider records before investigating settlement differences such as fees, refunds or payout timing.

Keep an evidence trail without exposing customer data.

Record references, state transitions, timings and sanitized errors. Restrict access to any retained payloads and set a retention period appropriate to your operation. Keep credentials, card details and customer identifiers out of shared debugging examples.

05 / Release checks

Test the failure paths before launch.

Use your provider's supported test environment and keep evidence against each check. The ticks below are a working checklist, not a certification. They stay on this page only and reset when you reload.

0 of 16 checks marked complete

Download an editable checklist ↗

06 / Handover

Make the integration operable after release.

Hand over the event mapping, order-state rules, credential owner, alert thresholds and the procedure for resolving a stuck payment. Include the test evidence and a clear rollback boundary. A release is easier to support when the next engineer can trace one order from checkout to fulfilment.

Need these payment records connected to invoicing or commerce operations? See our accounting integration services and marketplace integration services.

Bring us your payment flow.

JZ Tech builds payment integrations for web platforms, mobile apps and business systems. Share the gateway, market and the workflow you need to connect.

Discuss an integration