Start here
Sandbox demo
Run the full hosted checkout without a real bKash, Nagad, or Rocket transfer. Sandbox invoices inject a fake SMS and match TrxID + amount the same way live payments do.
Open /demo, pick an amount, then on checkout tap Simulate Send Money. Never fulfil a real order from a payment with sandbox: true.
1. Create a demo invoice (no JWT)
POST/api/payments/demo
Amount ৳10–৳500. Expires in 2 hours. Returns the public invoice payload including wallet numbers.
curl
curl -s http://localhost:4000/api/payments/demo \
-H "Content-Type: application/json" \
-d '{"amount":100,"customerName":"Demo customer"}'2. Open hosted checkout
browser
http://localhost:3000/pay/<PAYMENT_ID>3. Simulate Send Money (no JWT)
POST/api/payments/public/:id/demo-complete
Only works when sandbox is true. Creates a matching inbound SMS webhook, then verifies.
curl
curl -s http://localhost:4000/api/payments/public/<PAYMENT_ID>/demo-complete \
-H "Content-Type: application/json" \
-d '{"provider":"bkash"}'response (excerpt)
{
"id": "987a15a8-...",
"amount": 100,
"status": "verified",
"sandbox": true,
"provider": "bkash",
"trxId": "DBKH…"
}