eSewa Intent is a newer payment flow from eSewa that lets buyers pay inside the eSewa mobile app instead of the eSewa web page. PayBridgeNP handles both the deeplink (mobile) and the cross-device QR (desktop) automatically - sameDocumentation Index
Fetch the complete documentation index at: https://docs.paybridgenp.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/checkout call, eSewa just feels faster and more native.
Intent is currently sandbox-only. We are waiting for eSewa to publish their production endpoint and per-merchant access keys. When live opens, Intent becomes a Premium feature; in sandbox it is open to everyone so you can prove the integration before deciding to upgrade.
Why Intent matters
Compared to the existing eSewa v2 ePay (web) flow, Intent gives you:| v2 ePay (web) | Intent | |
|---|---|---|
| Mobile UX | Browser detour, retype password, OTP | One tap, native app, biometric |
| Desktop UX | Browser redirect to eSewa.com.np | QR code on your checkout, scan with phone |
| Conversion | Baseline | Higher on mobile (less drop-off) |
| Brand feel | ”I left your store and went to a website" | "I tapped pay and it just worked” |
How it works
You don’t change anything about how you create checkout sessions. PayBridgeNP picks Intent automatically when:- The buyer’s session is in sandbox mode (today’s only supported mode), AND
- The merchant has eSewa configured (existing
merchantCode+secretKeyis enough), AND - The merchant has flipped the eSewa Intent toggle on at Dashboard → Providers → eSewa (off by default), AND
- The merchant’s plan allows Intent - Free in sandbox, Premium in live (when live opens).
What the buyer sees
Buyer picks eSewa on the checkout page
Same picker tile as before. No “Intent vs Web” choice - we route automatically.
On mobile: deeplink opens the eSewa app
The page fires the eSewa deeplink. The eSewa app launches with the payment pre-filled. Buyer authenticates with biometric / PIN and pays. If the app does not open within 3 seconds (e.g. the buyer does not have the eSewa app installed), the page silently submits the v2 ePay web form so the buyer never gets stuck.
On desktop: QR with sonar rings + scan-line animation
The page renders a QR encoding the same deeplink. Buyer scans it with the eSewa app on their phone, pays, and the desktop page polls our
/status endpoint and flips to “Payment received” within seconds. There is also a “Pay on the web instead” link for buyers who do not have the eSewa app on their phone.What changes on your side
Nothing in the API. Your existingPOST /v1/checkout request shape is unchanged. Your existing webhooks fire with the same payment.succeeded event and the same payload - provider is still "esewa". The only outward signal that Intent was used is metadata.esewa_intent.bookingId on the checkout_sessions row, which is internal-only.
Testing in sandbox
In sandbox mode, any merchant on any plan can test Intent. You do not need to upgrade. The dashboard auto-fills eSewa’s public sandbox merchant code, secret key, and Intent access key for you - no setup beyond flipping the toggle. To test the full flow you will need:- A sandbox merchant account on PayBridgeNP (any plan).
- eSewa Intent toggled on at Dashboard → Providers → eSewa (off by default - flip it to enable Intent for your sandbox).
- eSewa’s sandbox test app (UAT APK). Direct download from eSewa: esewa_rc_release.apk (~58 MB). Install it on an Android device alongside your real eSewa app - the UAT app is a separate package and points at eSewa’s sandbox backend, so live payments cannot leak through it.
- A phone on the same WiFi as your dev server (for the desktop QR scan flow). Or just open the deeplink URL on the phone directly.
checkout_url and pick eSewa. Mobile gets the deeplink; desktop gets the QR.
What lives in metadata.esewa_intent
When Intent is dispatched, PayBridgeNP writes to checkout_sessions.metadata:
bookingId to look up the payment in eSewa’s merchant dashboard (when live opens). They are visible to merchants on the dashboard’s payment detail page but are not part of the public API surface today.
Refunds
Refunds for Intent payments behave the same as v2 ePay: PayBridgeNP records the refund asrequires_action and returns a message asking you to process it manually through the eSewa merchant dashboard. eSewa has not yet exposed an automated refund API for Intent (or for v2 ePay). When they do, refunds will become automatic for both flows in the same release.
What is coming
When eSewa hands over their production endpoint + per-merchant access keys, we will:- Wire the production URL into our eSewa adapter.
- Surface the Intent Access Key field on the dashboard’s eSewa credentials form (already pre-built, hidden behind the Premium gate today).
- Update this guide with the live-mode merchant onboarding steps (how to request your access key from eSewa).
Frequently asked
Will my existing eSewa integration keep working? Yes. Intent is additive - v2 ePay is still the only path for live mode and remains the fallback for sandbox merchants whose buyers do not have the eSewa app installed. Do I need to change my SDK / webhook code? No. The provider is still reported as"esewa", the payload shape is unchanged, and the only new field is internal metadata.
What happens if the buyer does not have the eSewa app installed?
On mobile, the page detects the deeplink did not open the app (3-second timeout via visibilitychange) and auto-submits the v2 ePay web form so the buyer continues without friction. On desktop, the QR is the primary call to action and there is a “Pay on the web instead” link beside it.
Can buyers refund themselves?
No. Refunds are merchant-initiated, same as today.
Why is there a 30-minute session expiry?
Buyers may background the eSewa app (phone call, app switch) and come back later. 30 minutes matches the picker’s expiry and gives buyers cushion. eSewa’s own session window is shorter; if they expire on eSewa’s side first the buyer gets a clear “session expired” message and can restart from your store.