Article
How to add bKash payments to a Laravel website
Sandbox to live in an afternoon: credentials, the checkout flow, verifying the callback and what to log so no payment is ever lost.
A
Al Emran
Aug 08, 2026
49 views
bKash is the payment method most Bangladeshi customers reach for first, so it is usually the first gateway we wire into a new site.
Start in the sandbox. Apply for merchant credentials, put them in your .env, and build the checkout against the sandbox URLs. Keep the app key, app secret, username and password out of the codebase.
The flow has three steps: create the payment, send the customer to bKash, then execute the payment when they come back. The mistake we see most often is trusting the redirect alone. Always call the execute endpoint and store the transaction ID, the amount and the status before you mark anything as paid.
Finally, log every callback, even the failed ones. When a customer says they paid and your system says they did not, that log is what settles it in seconds.
Start in the sandbox. Apply for merchant credentials, put them in your .env, and build the checkout against the sandbox URLs. Keep the app key, app secret, username and password out of the codebase.
The flow has three steps: create the payment, send the customer to bKash, then execute the payment when they come back. The mistake we see most often is trusting the redirect alone. Always call the execute endpoint and store the transaction ID, the amount and the status before you mark anything as paid.
Finally, log every callback, even the failed ones. When a customer says they paid and your system says they did not, that log is what settles it in seconds.
Keep reading
More from the Rayenda team
Why your website feels slow, and the five fixes that usually solve it
Images, fonts, caching, third-party scripts and the server. Fix those in order and most sites pass Core Web Vitals.
From Sharankhola to the world: why we are called Rayenda
A small town on the Baleshwar river, at the edge of the Sundarbans, and a company that decided to build from there.
Ten things we check before a Laravel app goes live
Debug off, HTTPS on, files private, queues running, backups tested. The launch checklist we run on every project.