SSLCommerz
SSLCommerz hosted payments: store ID and password, the IPN address, validation of every payment, risky payments held for review, sandbox testing and troubleshooting.
The SSLCommerz plugin sends the client to one hosted SSLCommerz page where they can pay with a card, mobile banking or internet banking of Bangladesh. It is free and suits Bangladeshi shops that want many ways to pay behind one merchant account. The currency is the invoice's currency (the plugin sends it to SSLCommerz; use BDT unless your merchant account allows others). The common parts of all gateways are in Payment gateways.
Switching it on
- Open Setup → Payment Gateways, tab All Payment Gateways, press Activate on SSLCommerz.
- Enter the Store ID and Store password, save.
- In the SSLCommerz merchant panel set the IPN address (below).
- Test with the sandbox store first.
Settings
| Setting | Meaning |
|---|---|
| Display name, Payment instructions, Fee %, Fixed fee | The settings every gateway has. |
| Test mode | Use the SSLCommerz sandbox (sandbox.sslcommerz.com) instead of the live host (securepay.sslcommerz.com). |
| Store ID | From your SSLCommerz merchant panel. While Test mode is on, enter the sandbox store ID. |
| Store password | The store password (API password). Leave it empty to keep the saved one. |
| IPN address | Read only: https://billing.example.com/callback/sslcommerz. Copy it into the merchant panel. |
Without a store ID and password the invoice shows SSLCommerz is not set up yet: the store ID or password is missing.
What SSLCommerz needs from you
- A merchant account with a store. Live and sandbox stores have different IDs and passwords.
- The IPN address entered in the merchant panel under IPN Settings. SSLCommerz calls it in the background when a payment changes state, which covers the client who closes the browser before coming back. The success, failure and cancel return addresses are sent with each payment, so you do not set them.
- If SSLCommerz asks you to register your server's IP address for the validation call, give it your host's outgoing IP address.
- HTTPS on your site and the PHP
curlextension.
How a payment goes
- The client presses Pay ... with SSLCommerz on an unpaid invoice. AIOBilling creates a session with the amount due, a unique transaction ID that starts with the invoice number, the client's name, e-mail, address, city, postcode, country and phone from the client record (missing pieces are filled with neutral values), and the invoice number as a reference.
- The client is sent to the SSLCommerz page and pays.
- SSLCommerz sends the browser back to the callback address and calls the IPN. Both carry a
val_id. - The plugin validates the
val_idwith SSLCommerz. The status must be VALID or VALIDATED; the invoice is found from the reference; the currency must equal the invoice currency; the amount is taken from SSLCommerz. - The bank transaction ID becomes the transaction on the invoice, the fee is worked out as the amount minus the store amount, and the invoice is marked paid. A payment seen twice is recorded once.
- A payment that SSLCommerz marks as risky is not recorded. The plugin holds it, writes held for review in the log, and puts a notice in your admin bell: SSLCommerz payment held, with the invoice and the
val_id. Check it in the SSLCommerz panel, and if it is good, record it by hand with Add Payment.
A return with the status failed, cancelled, unattempted or expired shows the client a warning and records nothing.
Refunds
There is no refund call. Refund in the SSLCommerz panel and record it on the invoice's Refund tab with Offline refund (record only).
Testing in the sandbox
- Create a sandbox store at SSLCommerz and enter its store ID and password.
- Switch Test mode on.
- Pay a small invoice from the client area with SSLCommerz's sandbox card or wallet details.
- The invoice should turn Paid and the Gateway Log should show
paid. - Enter the live store and switch Test mode off.
Troubleshooting
Look in Billing → Gateway Log (filter SSLCommerz) and Utilities → Module Log.
| Message or result | Cure |
|---|---|
| SSLCommerz could not start the payment: ... | SSLCommerz's own reason follows (a wrong store ID or password, a currency the store does not allow, or live details used in Test mode). |
validation failed / The payment could not be validated. | The validation call failed. Check the store password and that your server may call SSLCommerz. |
not valid | SSLCommerz does not confirm the payment. |
tran_id mismatch | The return does not belong to the validated payment. |
currency mismatch | The payment currency differs from the invoice. |
risky, held | See step 6 above. |
If the IPN seems not to arrive, check the address in the merchant panel (it must be exactly the one shown here) and that your site does not block outside callers. More in Troubleshooting.
Was this helpful?
Updated 2026-11-03