Web Development

eSewa & Khalti Payment Integration Guide for Nepal Websites

How to integrate eSewa and Khalti payments into your Nepal website or app. Developer guide: API setup, sandbox testing, and best practices.

✍️ Neuro AI Nepal Team 📅 May 12, 2026 ⏱ 8 min read 👁 12 views

Why eSewa and Khalti Integration is Essential for Nepal Websites

Cash on delivery accounts for only 42% of Nepal's online transactions as of 2024. eSewa and Khalti together command over 80% of Nepal's digital payment market. Any Nepal website or app that doesn't support these payment methods will see cart abandonment rates of 50–70%.

eSewa vs Khalti — Which to Integrate First?

FactoreSewaKhalti
Market Share~55%~35%
Users8M+ active5M+ active
Merchant Fee1.5–2%1.5–2%
Settlement TimeT+1T+1
API DocumentationGoodExcellent
Sandbox EnvironmentAvailableAvailable
SDK for FlutterAvailableAvailable

How to Get a Merchant Account

eSewa Merchant Account

  1. Go to esewa.com.np → Business → Become a Merchant
  2. Submit: Company registration certificate, PAN certificate, bank account details
  3. Processing time: 3–7 working days
  4. You'll receive: Merchant ID, Secret Key, API credentials

Khalti Merchant Account

  1. Go to khalti.com → Merchants → Register
  2. Submit: Business registration, PAN, bank details, website URL
  3. Processing time: 2–5 working days
  4. You'll receive: Live Key, Secret Key, Merchant ID

Integration Approaches for Nepal Websites

Direct API Integration (Recommended for Custom Sites)

For custom Django, Laravel, or Node.js websites, direct API integration gives full control. Both eSewa and Khalti provide REST APIs with clear documentation.

WordPress/WooCommerce Plugin

Several Nepal developers have built WooCommerce payment plugins for eSewa and Khalti. Install from WordPress plugin directory and configure with your merchant credentials.

Payment Gateway Wrapper (For Multiple Gateways)

Services like Fonepay and PayWay act as wrappers, letting you accept eSewa, Khalti, bank cards, and ConnectIPS from a single integration.

Testing Your Integration

Both eSewa and Khalti provide sandbox environments for testing:

  • eSewa sandbox: Use test merchant ID and test phone numbers provided in documentation
  • Khalti sandbox: Use testpid and test API keys with NPR amounts in paisa (1 NPR = 100 paisa)
  • Always test the full flow: initiate payment → confirm → verify → handle failure

Common eSewa/Khalti Integration Mistakes

  • Not verifying payment on the server side (client-only verification is insecure)
  • Using live keys in development (creates real transactions)
  • Not handling payment failures gracefully
  • Displaying prices in paisa instead of NPR to users
  • Not testing refund flows

Neuro AI Nepal integrates eSewa, Khalti, and ConnectIPS into websites and apps. Contact us for payment integration in your existing project.

Neuro AI Nepal Team

Backend Developers & Payment Integration Specialists, Nepal