Shreyasi Madhu
Co-Founder & Engineer, PSBM Labs
For most consumer apps built for the Bangladeshi market, mobile financial services aren't optional — they're the primary way customers expect to pay. Integrating bKash and Nagad is more involved than a typical Stripe integration, and this covers what actually goes into doing it properly.
Getting API access
Both bKash and Nagad require a formal merchant account before you get production API credentials. This process involves business verification and typically takes longer than most teams budget for, so it's worth starting the application in parallel with development, not after.
Sandbox first, always
Both providers offer sandbox environments for testing before going live. Building and testing the entire payment flow — checkout, callback, failure handling — against sandbox credentials first saves painful surprises once real money is moving through the system.
The parts teams usually underestimate
- Callback handling — payment confirmation often arrives asynchronously via a webhook, not as a direct response to the payment request. Your backend needs to handle this correctly, including retries.
- Reconciliation — matching provider transaction reports against your own order records daily, so disputes and refunds don't rely on manual digging.
- Failure and timeout states — customers on unstable connections will abandon payments mid-flow more often than you'd expect; the UI needs a clear "pending" state, not just success or failure.
- Refunds — both providers support programmatic refunds, but the flow differs from the payment flow and needs its own testing pass.
Security basics
Never trust a client-side "payment successful" message alone — always verify the transaction server-side against the provider's API before marking an order as paid. This is the single most common integration mistake we see in half-finished projects we're asked to fix.
Supporting both, not just one
bKash has the larger user base, but Nagad has meaningful share too, and offering both — plus cash on delivery where relevant — measurably reduces checkout drop-off compared to supporting only one.