Skip to content

Hosted checkout

checkout_url points at /pay/<sessionId>. The page is rendered fresh on every request and is the only surface a buyer touches.

What the page shows

  • The amount in taka and your order reference, so the buyer can check both against what they are paying for.
  • Your public display name. Your account email is never shown to a buyer.
  • The receiving number or numbers taken from your active paired devices, with the order reference to use when sending.
  • A provider selector limited to the providers your active devices actually cover: bKash, Nagad, Rocket, Upay and Cellfin. An account with no paired device yet falls back to bKash so the page never renders with nothing to pick.
  • A Transaction ID field, and a submit button reading আমি ৳1200 পাঠিয়েছি / I have paid ৳1200.
  • A live countdown to expires_at, which turns red in the last five minutes and disables the button at zero.

Language

Every label, instruction, status and error is written in Bengali and English on the same line. There is no language switch to find, and nothing is English-only.

Session states

StateWhat the buyer sees
pendingThe payment form.
completedইতিমধ্যে পরিশোধ করা হয়েছে / Already paid, with a link onward to your success_url.
cancelled, expired, failed, or past expires_atসেশনের মেয়াদ শেষ / Checkout no longer available, with a link to your cancel_url.
Unknown session idচেকআউট পাওয়া যায়নি / Checkout not found.

What submitting does

The form POSTs sessionId, trxId and provider to /api/v1/checkout/submit. The TrxID is upper-cased and must match [A-Z0-9]{6,20}. On success the buyer sees a confirmation and, if you supplied a success_url, is redirected there after about a second and a half.

A double-click is not an error.Submitting the same TrxID twice against a session that is already complete returns 200 with success: true, so a retry after a dropped response shows the buyer success rather than a failure.

Redirect safety

success_url and cancel_url are validated when the session is created and checked again in the browser immediately before navigating. Anything that is not https: is not followed, so a merchant-supplied URL cannot run script on the shared checkout origin.