Back to Insights
FinTech Engineering

Custom PGW Integration Service in Bangladesh: Sandbox & Go-Live

By Kazi Nowshad Abir·November 2026·8 min read

“You spend two weeks testing your payment gateway in sandbox. Everything works. You switch the API keys to live mode, announce your launch... and within thirty minutes, three customers call you saying money was deducted from their bKash, but your website still says their order is unpaid. What went wrong?”

This is the most common launch-day nightmare for software engineers and startup founders in Bangladesh. Connecting a payment gateway looks deceptively easy on paper—you just send an API request and redirect the user. But in the real world of fluctuating mobile data connections and browser tab closures, simple redirect integrations fail constantly.

Through our custom payment integration service, Vivago Technologies builds fault-tolerant payment backends that never drop transactions. Here is the exact sandbox testing checklist and go-live playbook we use to guarantee 100% reliable checkouts.

The 3 Silent Killers of Payment Gateways in Production

1. The User Closes Their Browser Tab Right After Paying

When a user types their OTP on a mobile phone, they often see the green “Payment Successful” screen and immediately swipe the browser closed. If your backend relies on the user returning to your website's success_url, your server never knows the payment happened. You must listen to background server-to-server Instant Payment Notifications (IPN).

2. The Double-Tap on a Lagging 4G Network

When a checkout page freezes for 2 seconds, impatient users tap “Pay Now” twice. Without strict database row locking (idempotency), two payment sessions fire at once—causing double deductions or duplicate orders.

3. Gateway 504 Gateway Timeouts

During peak festival hours (like Eid flash sales), gateway servers occasionally time out. If your backend does not run an automated reconciliation worker that checks pending transactions after 5 minutes, money gets trapped in limbo.

The 6 Mandatory Sandbox Tests Before Going Live

Before asking SSLCommerz, bKash, or Nagad to activate your production keys, test these six real-world edge cases in your sandbox environment:

Test 1: Browser Closed EarlySimulate a payment, then close the tab before redirection. Ensure the background IPN still marks the order PAID and sends an SMS receipt.
Test 2: Double-Tap & Webhook RetriesSend the exact same IPN payload twice to your webhook. The second request must be safely ignored without duplicate ledger entries.
Test 3: Tampered Payable AmountTry to manipulate the POST payload from ৳5,000 to ৳5. Your server must compare the callback against your database invoice and reject mismatches.
Test 4: Gateway Timeout Auto-RecoverySimulate a 504 network drop. Verify that a background cron job queries the gateway status API after 5 minutes and updates confirmed payments.
Test 5: Full & Partial RefundsExecute a refund directly through the admin panel API. Confirm that the gateway debits the refund and logs negative ledger entries.
Test 6: Bank Card EMI & BIN ValidationTest high-ticket checkouts to ensure 3/6/12 month EMI options render properly for supported local banks without crashing checkout.
Pass Audits on Day 1

Want a Bulletproof Payment Integration?

Our engineering team handles sandbox testing, IPN webhooks, idempotency locks, and regulatory compliance reviews so your platform goes live without a single dropped transaction.

Related Payment Guides:

Frequently Asked Questions

Why does the gateway compliance auditor ask for a Refund Policy page?

Bangladesh Bank regulations require all digital merchants to state explicit refund timelines (e.g., 7 to 10 working days) and customer support contact details on their website before live merchant credentials can be activated.

What is the difference between a client redirect and an IPN webhook?

A client redirect relies on the user's phone browser successfully returning to your website. An IPN webhook is an independent, encrypted server-to-server HTTP call made directly by the gateway to your server, ensuring payment confirmation even if the user closes their browser.