• How to Add eSewa and Khalti Payments to Your Website

    Link copied!
    Online checkout page with two payment wallet badges, a padlock and a phone confirmation for eSewa and Khalti integration

    eSewa and Khalti Integration

    A lot of Nepali business websites still end the same way: “Call us to order” or “Message us on Viber.” That’s an extra step for the customer, and some of them won’t bother. Once eSewa and Khalti are on your site, people can pay right there, with apps they already have on their phones, even at 11 at night when nobody’s answering calls.

    Getting set up happens in two parts. You open a merchant account with each provider, which is simply the business account the money goes into. Then your website gets connected to those accounts, tested, and switched on.

    Most people expect the website side to be the hard part. Usually it’s the paperwork. Approval can take a while, so send in your merchant applications before anything else. The rest of this post covers how eSewa and Khalti payment integration works, what you’ll need, and what to check before real customers start paying.

    Quick Answer: eSewa and Khalti payment integration needs an approved merchant account with each provider and a website connection, either through a plugin such as a WooCommerce one or through custom code. You set everything up in each provider’s test environment first, then switch to live keys. Merchant approval involves business documents and some waiting, so apply early.

    • 2 PartsMerchant accounts, then the website connection
    • 7 StepsFrom application to live payments
    • SandboxTest mode offered by both providers
    • 60 MinDefault Khalti live payment link expiry

    What Actually Happens When Someone Pays

    Your customer never enters wallet details on your site. eSewa and Khalti both send them to their own page to pay, then send them back to you. Step by step, it goes like this:

    1. Step 1: The customer chooses a walletAt checkout, the customer chooses eSewa or Khalti.
    2. Step 2: Your site sends the orderYour site sends the order amount and details to that provider.
    3. Step 3: The customer approves the paymentThe customer lands on the eSewa or Khalti page, logs in and approves the payment.
    4. Step 4: They return to your siteThey’re sent back to your site, along with a result saying whether the payment went through.
    5. Step 5: Your site verifies the paymentYour site checks with eSewa or Khalti directly that the payment is real, and only then marks the order as paid.

    Don’t skip step five. A customer reaching your “thank you” page doesn’t prove you’ve been paid. Checking with the provider does.

    What You Need First

    You can’t take a single payment without a merchant account. Khalti says so directly in its documentation. eSewa gives each merchant its own secret key and a merchant wallet, which is where your money shows up. Its developer docs cover the technical side.

    Here’s how the two compare:

    FactoreSewaKhalti
    AccounteSewa merchant (ePay) accountKhalti merchant account
    Current web versionePay v2KPG-2 (Web Checkout)
    TestingTest user accounts providedSandbox with test accounts
    Going liveMerchant code and secret key from eSewaLive keys from your Khalti merchant dashboard
    Where you see paymentsMerchant walletMerchant dashboard

    Documents for an eSewa or Khalti merchant account

    Requirements change from time to time, so ask each provider for their current list before you apply. Businesses are usually asked for:

    • Company or firm registrationA company or firm registration certificate.
    • PANA PAN certificate.
    • Bank detailsBusiness bank account details.

    There’s a review period after you apply. If your website is being built right now, send the applications this week. Plenty of shops end up with a finished checkout that can’t take payments yet because approval is still pending.

    Setting It Up, Start to Finish

    1. Step 1: Apply to eSewa and KhaltiThese are two separate applications. Do them before anything else.
    2. Step 2: Decide how your site will connectWordPress sites running WooCommerce can use a plugin. If your site was custom-built, a developer will write the connection using each provider’s documentation. There’s a comparison further down.
    3. Step 3: Get it working in test modeBoth providers have a sandbox, a practice version where you make pretend payments with test accounts. No real money moves, so you can break things freely.
    4. Step 4: Try to break itA successful payment is the easy case. Cancel a payment halfway. Let one fail. Close the browser tab in the middle. Try paying twice for the same order. Khalti payment links also expire after 60 minutes by default in live mode, so find out what your site does when someone comes back too late.
    5. Step 5: Swap in your live keysReplace the test URLs and keys with the real ones from your merchant account. If you forget one, checkout can look perfectly fine while no money arrives.
    6. Step 6: Pay for something yourselfBuy a cheap item with your own wallet. Make sure the order shows as paid on your site and the money shows up in your eSewa or Khalti account.
    7. Step 7: Keep an eye on itFor the first few weeks, compare the paid orders on your website with what eSewa and Khalti show. If the two don’t match, you’ll catch it quickly.

    Plugin or Custom Code?

    It mostly depends on how your website was built.

    FactorPlugin (WordPress / WooCommerce)Custom integration
    SuitsWooCommerce storesCustom-built sites, booking systems
    SetupInstall, add your merchant keys, testA developer builds it from the provider docs
    FlexibilityWhatever the plugin offersBuilt around your exact checkout
    UpkeepKeep the plugin updatedCode needs updating when eSewa or Khalti change their systems

    If you’re trying to add eSewa to a WordPress website, there are ready-made plugins. One WooCommerce plugin, for example, handles eSewa (ePay v2), Khalti (KPG-2) and ConnectIPS together. A plugin is just the connector, though. You’ll still need your own approved merchant accounts.

    Before you install any eSewa WooCommerce plugin or Khalti WordPress plugin, check when it was last updated and make sure it supports ePay v2 and KPG-2. An abandoned plugin built for older versions will cause you trouble.

    Other Options: Fonepay, ConnectIPS and Cash on Delivery

    Most shops start with eSewa and Khalti, but they’re not the only choices.

    Fonepay

    QR payments

    Fonepay works through QR codes scanned from banking apps, and you get your credentials through Fonepay or your bank.

    ConnectIPS

    Direct bank payments

    ConnectIPS lets people pay straight from their bank account, and some WooCommerce plugins support it alongside eSewa and Khalti.

    Cash on Delivery

    Keep it as a backup

    Don’t drop cash on delivery just because online payments are live. Some customers simply prefer to pay when the parcel arrives. If one method fails for someone, having another ready means you don’t lose the sale.

    What Affects eSewa Integration Cost?

    There isn’t one price, because no two setups need the same amount of work.

    1. Your platformA WooCommerce store using a ready-made plugin needs far less work than a custom-built site.
    2. Number of gatewaysEach extra gateway adds its own setup and testing.
    3. Custom featuresFeatures like booking deposits or part payments take longer to build.
    4. Testing depthProper testing, including failed payments and refunds, takes real time, which is time well spent.

    Transaction fees and how quickly money reaches your bank are set in your merchant agreement with each provider. Read it before you sign. Want a clear scope for your own site? Talk to our team.

    Where People Usually Go Wrong

    1. Building the checkout firstThe most common mistake is building the checkout first and applying for merchant accounts later. You end up with a ready website and no way to take money.
    2. Trusting the “success” pageIf your site marks an order as paid just because the customer came back, without checking with eSewa or Khalti, you could ship goods nobody paid for.
    3. Only testing payments that go throughWhen a cancelled or expired payment happens on a live site, the order should stay unpaid and clearly marked, not stuck halfway.
    4. Leaving test keys in placeTest keys left in place after launch cause the “why is no money coming in” panic. Double-check them.
    5. Overlooking mobilePlenty of customers pay from their phones. A clothing store like Newish Fashion needs product pages and checkout to work properly on a small screen. Run through the whole payment on an actual phone.
    6. Not reading the merchant agreementRefund rules, limits and fees are all in there, and they’re much less annoying to learn before a customer asks for a refund than after.

    Frequently Asked Questions

    Getting Started

    How do I add eSewa and Khalti to my website?

    Get a merchant account with each provider, connect your website with a plugin or custom code, test everything in sandbox mode, then switch to live keys. You can’t do eSewa and Khalti payment integration without approved merchant accounts.

    Do I need a merchant account for eSewa and Khalti?

    Yes. Both require one before you can receive payments. A plugin only links your website to those accounts.

    What documents do I need for an eSewa merchant account?

    Businesses are usually asked for a company or firm registration certificate, a PAN certificate and bank account details. Check eSewa’s current list before you apply.

    Plugins, Testing & Cash on Delivery

    Is there an eSewa plugin for WooCommerce?

    Yes. There are WooCommerce plugins that support eSewa’s ePay v2, and some cover Khalti and ConnectIPS as well. Make sure whichever one you choose is still being updated.

    Can I test eSewa and Khalti payments before going live?

    Yes. Both have test environments with test accounts, so you can run complete payments without moving real money.

    Should I still offer cash on delivery?

    Most Nepali online stores keep it alongside online payments, since some customers still prefer to pay when their order arrives.

    Before You Go Live

    None of this is complicated. It just works better done in the right order: merchant accounts first, then the plugin or custom setup, then lots of testing, including the payments that go wrong.

    The same applies if you take bookings instead of orders. A trekking agency like Discover Himalaya Nepal needs customers to know for certain their booking is paid, just as a shop does with an order. Payment alerts and order confirmations usually come by email, so a proper business email on your own domain helps make sure none slip past you.

    And if you’d rather hand the whole job to someone else, our e-commerce website development service sets up eSewa, Khalti, Fonepay, ConnectIPS and cash on delivery for you. You can also contact us to talk through your project.