Skip to content
E-commerce

Adding eSewa and Khalti Payments to Your Website

Nepali customers expect to pay with eSewa, Khalti, Fonepay or mobile banking. Adding these to your website or online store is straightforward when it is done carefully. Done carelessly, it is one of the easiest ways for a small store to lose money. Here is how the process works, step by step.

Netanix Lab team4 min readUpdated
Adding eSewa and Khalti Payments to Your Website
On this page
  1. 01Which payment methods should you offer?
  2. 02Step 1: Get a merchant account
  3. 03Step 2: Plan the checkout
  4. 04Step 3: Build and test in the sandbox
  5. 05Step 4: Verify every payment on the server
  6. 06Step 5: Go live and reconcile daily
  7. 07Security checklist for online payments
  8. 08Common mistakes we fix
  9. 09What it costs
  10. 10How we build payments

Which payment methods should you offer?

Most Nepali online stores offer two or three digital wallets plus cash on delivery. eSewa and Khalti are the most familiar wallets, and Fonepay lets customers pay by scanning a QR code from almost any Nepali bank app.

You do not need every method on day one. Start with the ones your customers ask for most, and add others as you grow.

MethodHow customers payGood for
eSewaLog in to their eSewa walletWide reach across Nepal
KhaltiWallet, mobile banking or cardsYounger, mobile-first customers
FonepayScan a QR code with a bank appCustomers who prefer their own bank
Cash on deliveryPay the delivery personFirst time buyers who want to see the product

Step 1: Get a merchant account

Each provider gives businesses a merchant account with keys for testing and for live payments. Apply directly with each provider. They usually ask for your company registration, PAN or VAT certificate, bank account details and the owner's identification.

Approval can take a few days, so start this early. The rest of the website can be built while you wait.

Step 2: Plan the checkout

A good checkout is short and clear. Show the total, delivery charge and payment options on one screen. After payment, show a clear success or failure page and send a confirmation by SMS or email.

Plan what happens when something goes wrong: the customer closes the app halfway, the wallet has low balance, or the connection drops. These cases happen every day.

Step 3: Build and test in the sandbox

Each provider offers a test environment where no real money moves. Every payment flow should be tested there first: successful payments, cancelled payments, failed payments, duplicate clicks and refunds.

Testing these properly takes time, but it is far cheaper than finding the problems with real customers.

Step 4: Verify every payment on the server

This is the step that matters most. When a customer pays, the provider sends them back to your website with details of the payment. Those details can be faked by someone who knows what they are doing.

So an order should only be marked as paid after your server checks the payment directly with the provider, using their verification or status check API, and confirms the amount and order number match. Never trust the browser alone.

Step 5: Go live and reconcile daily

Once testing passes, switch to the live keys and make a few small real payments yourself. Then match payments against orders every day. Good software does this automatically and flags anything that does not match, such as a payment without an order.

Security checklist for online payments

  • HTTPS on every page of the website
  • Payment keys stored on the server, never in the website code
  • Server side verification of every payment
  • Checks that the amount paid matches the order total
  • Protection against the same payment being used twice
  • Logs of every payment attempt for support and disputes
  • A security test of the checkout before launch

Common mistakes we fix

  • Orders marked as paid from the browser success page
  • Payment keys visible in the website's code
  • No handling for cancelled or failed payments, leaving orders stuck
  • Different totals on the cart page and the payment page
  • No daily check, so problems are found weeks later

What it costs

Payment integration is usually part of building an online store. The cost depends on how many methods you add, how your orders and stock work and whether payments need to sync with your billing software. See our guide to website costs in Nepal for typical online store ranges.

Providers also charge a small fee per transaction, set by each provider and your agreement with them.

How we build payments

We integrate eSewa, Khalti, Fonepay and other methods into websites, online stores and apps, with server side verification on every payment. Because our team also runs security competitions through NetanixCTF, we test checkouts the way an attacker would before launch. Our NLab Billing system takes payments through eSewa and Fonepay. Learn more about our ecommerce development service.

E-commerce Development

Online stores with Nepali payments, inventory sync and fast checkout.

Get a free quote

Common questions

  • Yes. Most Nepali online stores offer both, plus Fonepay QR, cash on delivery or bank transfer.

  • Providers usually ask for company registration, a PAN or VAT certificate, bank details and the owner's identification. Check the current list with each provider.

  • Yes, when every payment is verified on the server with the provider and keys are kept private. We test payment flows before launch.

  • The development usually takes one to two weeks per method, including testing. Merchant account approval can take a few days, so apply early.

  • Yes, providers charge a small fee per transaction. The exact rate depends on the provider and your merchant agreement.

Keep reading

All articles

You think, we create.

Have an idea? Let's build it.

Tell us what you have in mind. We'll reply within one business day with honest advice and a clear next step.

Start a project WhatsApp