Short answer
To integrate SSLCommerz you register a sandbox store to get a store ID and store password, create a payment session from your server with the order amount, currency, transaction ID, customer details and your success, fail, cancel and IPN URLs, then redirect the customer to the gateway page returned by the session API. When the customer returns or the IPN arrives, call SSLCommerz's order validation API from your server with the validation ID and only mark the order paid if the status is valid and the amount, currency and transaction ID match your order. After testing, apply for a live store and swap credentials.
Before you write code
- Create a sandbox account on the SSLCommerz developer site to receive test store credentials.
- Decide your integration type: hosted payment page (simplest and most common), easy checkout popup, or an official plugin for WooCommerce and other platforms.
- Make sure your live website has product pages, prices, contact details and terms, privacy and refund policies — live store approval depends on them.
- Keep store ID and password only in server-side configuration.
The payment flow
| Step | Who | Detail |
|---|---|---|
| 1. Create session | Your server | POST order data (total amount, currency, tran_id, product and customer fields, success/fail/cancel/IPN URLs) to the session API |
| 2. Redirect | Browser | Send the customer to the gateway URL returned in the response |
| 3. Pay | Customer | Chooses card, mobile banking or internet banking on the SSLCommerz page |
| 4. Return + IPN | SSLCommerz | Posts the result to your success/fail/cancel URL and separately to your IPN listener |
| 5. Validate | Your server | Calls the validation API with val_id; checks status, amount, currency and tran_id |
| 6. Fulfil | Your server | Marks the order paid exactly once and sends confirmation |
Field and endpoint names follow the SSLCommerz developer documentation; always build against the current version.
Why the IPN and validation step matter
The browser redirect can fail — the customer closes the tab, mobile data drops, or someone forges a POST to your success URL. The IPN (instant payment notification) is a server-to-server message that arrives even when the browser does not, and the validation API is your proof that SSLCommerz actually recorded the payment. Use both: process whichever arrives first, validate it, and make the handler idempotent so the second arrival does nothing.
Also store the bank transaction ID and card or wallet type returned by validation; your accounts team will need them for reconciliation and refunds.
Common SSLCommerz integration mistakes
- Trusting the success URL — never mark paid from the redirect alone; always validate on the server.
- Reusing transaction IDs — generate a unique tran_id per attempt so retries do not collide.
- Amount drift — compare validated amount with the order total stored on your server, not the value posted back.
- Sandbox credentials in production — a surprisingly common go-live bug; keep environments in separate config.
- Ignoring risk flags — validation can return a risk level; hold risky orders for manual review instead of auto-shipping.
Go-live checklist
- Test successful, failed, cancelled and abandoned payments in sandbox.
- Simulate a lost redirect and confirm the IPN alone completes the order.
- Test a refund through the refund API or merchant panel and record it against the order.
- Apply for the live store with complete business documents and switch to live credentials and endpoints.
- Reconcile the first weeks of settlements against your order list daily.
How DreamIT can help
DreamIT has integrated payments, messaging and e-commerce systems for Dream Group brands and client projects. If you need help with SSLCommerz integration, we can scope the integration, test it end to end and hand it over with documentation. Contact DreamIT.
Frequently asked questions
Does SSLCommerz support bKash and Nagad?
SSLCommerz's hosted page offers cards, mobile banking and internet banking; the exact wallets and banks enabled depend on your merchant agreement, so confirm with SSLCommerz.
Is there an SSLCommerz plugin for WooCommerce?
Yes, SSLCommerz provides plugins and SDKs for common platforms. Keep them updated and still confirm that the plugin performs server-side validation.
What is the difference between the IPN and the success URL?
The success URL is where the customer's browser lands; the IPN is a separate server-to-server notification. The IPN is more reliable and should drive fulfilment after validation.
How do I get a live SSLCommerz store?
After sandbox testing, apply for a live store with your business documents and a complete website. SSLCommerz reviews the application and issues live credentials.
Sources and further reading
Editorial note: this guide is written for general information and reviewed by the DreamIT team. We do not publish prices or fees we cannot source; always confirm current pricing, fees and requirements with the provider before you decide. Last reviewed 27 Nov 2026.
Related guides
- bKash Payment Gateway Integration: A Developer's Checklist
- E-commerce Website Development in Bangladesh: Platform, Payments and Delivery
- Payment Gateways in Bangladesh: How to Choose and Get Approved
- Bulk SMS in Bangladesh: Masking vs Non-Masking, APIs and BTRC Rules
- Courier API Integration in Bangladesh: Automating Parcels from Order to COD
- How to Choose a Digital Marketing Agency in Bangladesh Without Wasting Your Budget
- All integration & e-commerce guides

