Quick Answers
| Problem | Common cause | Fix |
|---|---|---|
| Merchant application rejected | Incomplete business documents | Submit PAN, company registration, and bank account details |
| Sandbox works, live fails | Live keys not activated or domain mismatch | Register the exact live domain; use the live secret key |
| Payment success not reaching your site | Webhook/callback URL misconfigured | Verify callback URL and signature verification code |
Step 1: Check business requirements
- You need a registered business: PAN/VAT certificate or company registration.
- A bank account in the business name (or verified owner name).
- A live website or app with a working checkout page.
Ad Slot — in-article 1 — advertising placeholder
Step 2: Register as a merchant
- eSewa: apply at merchant.esewa.com.np with business documents.
- Khalti: apply at admin.khalti.com with the same documents.
- Both review within a few working days; expect a verification call.
Step 3: Get your keys and set up the sandbox
- eSewa provides a Merchant Code and Secret Key.
- Khalti provides a Public Key and Secret Key.
- Start integration against the sandbox (test) environment.
Step 4: Integrate the payment link or API
- No-code option: generate a payment link/QR from the merchant dashboard.
- API option: add the checkout call on your site with the merchant keys.
- Use the official documentation for the exact endpoint and fields.
Step 5: Configure the callback/webhook
- Set the callback URL where the wallet sends the result after payment.
- On the server, verify the signature with your secret key before marking paid.
- Test a real (small) payment in sandbox mode first.
Step 6: Go live
- Confirm the live domain in the merchant dashboard — mismatches break live payments.
- Switch keys from sandbox to live and run one real transaction.
- Keep transaction logs for refunds and disputes.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| Sandbox payment works but live URL fails | Live keys or domain not activated | Check merchant dashboard for live status; re-enter domain exactly |
| Customer paid but order not updated | Callback not verified | Check server logs; ensure callback path is public (no auth wall) |
| Refund API errors | Wrong transaction reference | Use the wallet transaction ID from the dashboard, not your order ID |
Ad Slot — in-article 2 — advertising placeholder
FAQ
Q: Does eSewa/Khalti charge merchant fees?
A: Yes, each gateway has per-transaction fees and settlement cycles — check the merchant agreement.
Q: How long does settlement take?
A: Typically 1–2 working days after successful transaction matching.
Q: Do I need a developer for integration?
A: For payment links and QR, no. For API checkout, basic web development is needed.