Hosting Nepal
Hosting Nepal
BlogNepal Business
Nepal Business
8 min read· August 17, 2026

How to Integrate Khalti and eSewa for Your Nepali E-commerce: A Step-by-Step Guide

Learn how to integrate Khalti and eSewa, Nepal's leading mobile payment gateways, into your e-commerce website to offer convenient payment options for your Nepali customers, boosting sales and customer satisfaction.

H

Hosting Nepal Editorial

Editorial Team · Updated Aug 17, 2026
How to Integrate Khalti and eSewa for Your Nepali E-commerce: A Step-by-Step Guide

How to Integrate Khalti and eSewa for Your Nepali E-commerce: A Step-by-Step Guide

Integrating Khalti and eSewa into your Nepali e-commerce website is crucial for offering convenient payment options, enhancing customer experience, and boosting sales. This guide provides a step-by-step process for Kathmandu startups, SMBs, and e-commerce operators to seamlessly add these popular mobile payment gateways.

Key facts: * Khalti and eSewa are the most widely used digital wallets in Nepal, with millions of active users. * Offering local payment options like Khalti and eSewa significantly improves conversion rates for Nepali e-commerce businesses. * Integration typically involves obtaining merchant credentials and installing a plugin or using an API. * Hosting Nepal offers robust hosting solutions optimized for e-commerce platforms, ensuring smooth payment gateway operations.

Overview of Khalti and eSewa Integration for Nepali E-commerce

For any Nepali e-commerce business, providing local payment methods is not just a convenience; it's a necessity. According to a 2025 report by the Nepal Telecommunications Authority (NTA), digital wallet transactions have grown by over 40% year-on-year, making Khalti and eSewa indispensable for online businesses. These platforms allow customers to pay directly from their mobile phones, often linked to bank accounts or top-up services, without needing credit or debit cards.

Integrating these gateways means your customers can complete purchases quickly and securely. This is particularly vital for a Kathmandu startup aiming to capture the local market or an established Nepali e-commerce store looking to streamline its checkout process. Hosting Nepal understands these local needs and provides hosting environments that are fully compatible with these payment solutions, ensuring high availability and fast transaction processing.

Why Local Payment Gateways Matter for Nepali Businesses

Local payment gateways like Khalti and eSewa are critical for several reasons:

* Higher Conversion Rates: Many Nepali consumers prefer or exclusively use digital wallets for online transactions. Offering these options reduces cart abandonment. * Accessibility: They cater to a broader audience, including those without traditional banking cards. * Trust and Familiarity: Customers trust payment methods they are familiar with, leading to increased confidence in your Nepali e-commerce store. * Faster Transactions: Payments are often instant, improving cash flow for your business.

Step-by-Step Integration Process

The process of integrating Khalti and eSewa into your e-commerce platform typically follows a similar pattern, whether you're using WordPress with WooCommerce, Shopify, or a custom-built solution. We'll focus on the most common scenario: WordPress/WooCommerce, which is popular among Nepal SMBs.

Step 1: Register as a Merchant with Khalti and eSewa

Before you can integrate, you need to have a merchant account with both Khalti and eSewa. This involves a registration and verification process.

* Khalti Merchant Registration: Visit the Khalti Business portal, fill out the application form with your business details (company registration, PAN/VAT, bank account info), and submit the required documents. Once approved, you will receive merchant credentials, including a Public Key and Secret Key. * eSewa Merchant Registration: Similarly, go to the eSewa Business section, complete the merchant application, and provide your business documentation. After verification, eSewa will provide you with Merchant Code, Secret Key, and Success/Failure URL parameters.

Pro Tip: Ensure all your business documents are up-to-date to expedite the approval process. This can take anywhere from a few days to a couple of weeks, depending on the completeness of your application.

Step 2: Choose Your Integration Method

There are generally two ways to integrate: using a pre-built plugin/extension or via API (Application Programming Interface) for custom solutions.

* For WordPress/WooCommerce: This is the easiest and most recommended method for most Nepal SMBs and Kathmandu startups. Search for official or reputable Khalti and eSewa WooCommerce plugins in the WordPress plugin directory or directly from their respective developer portals. These plugins handle most of the technical complexities. * For Custom E-commerce Platforms: If you have a custom-built e-commerce website, you will need to use the API documentation provided by Khalti and eSewa. This requires a developer to implement the payment logic directly into your website's code.

Step 3: Install and Configure the Plugin (for WordPress/WooCommerce)

Once you've chosen your plugins, installation is straightforward.

* Install Khalti WooCommerce Plugin: 1. Log in to your WordPress admin dashboard. 2. Navigate to Plugins > Add New. 3. Search for "Khalti WooCommerce Payment Gateway" (or similar official plugin). 4. Click Install Now and then Activate. * Install eSewa WooCommerce Plugin: 1. Repeat the steps above, searching for "eSewa WooCommerce Payment Gateway" (or similar official plugin).

Step 4: Configure Plugin Settings with Merchant Credentials

After activation, you need to configure each plugin with your unique merchant details.

* Khalti Configuration: 1. Go to WooCommerce > Settings > Payments. 2. Find "Khalti" in the list of payment gateways and click Manage. 3. Enable Khalti, set a Title and Description for customers. 4. Enter your Public Key and Secret Key obtained from Khalti. 5. Save changes. * eSewa Configuration: 1. Go to WooCommerce > Settings > Payments. 2. Find "eSewa" and click Manage. 3. Enable eSewa, set a Title and Description. 4. Enter your Merchant Code and Secret Key from eSewa. 5. Configure Success URL and Failure URL as per eSewa's instructions (often provided by the plugin or you can use your website's thank you/order failed pages). 6. Save changes.

Step 5: Test Your Integration

Thorough testing is crucial before going live. Make sure to test both successful and failed transactions.

* Use Test Credentials: Both Khalti and eSewa provide sandbox or test environments and credentials. Use these first to avoid real transactions. * Place Test Orders: Go through your e-commerce checkout process as a customer. Select Khalti, then eSewa, and complete the payment flow. * Verify Orders: Check if the orders are correctly recorded in your WooCommerce admin and if the payment status is updated accurately. * Check Notifications: Ensure you receive order notifications and that customers receive payment confirmations.

Important: Once testing is complete and successful, switch to your live production credentials in the plugin settings.

Common Issues and Troubleshooting

Even with a clear guide, you might encounter issues during integration. Here are some common problems and their solutions:

1. Invalid Merchant Credentials

* Problem: Payments fail with an "invalid credentials" or "authentication failed" error. * Solution: Double-check that you've entered the Public Key, Secret Key, Merchant Code, etc., exactly as provided by Khalti and eSewa. Ensure there are no extra spaces or typos. Confirm you are using production credentials for live mode and test credentials for sandbox mode.

2. Payment Gateway Not Showing at Checkout

* Problem: Khalti or eSewa options are not visible on your checkout page. * Solution: Go to WooCommerce > Settings > Payments and ensure the gateway is Enabled. Also, check if the plugin itself is activated under Plugins.

3. Transaction Failures or Pending Status

* Problem: Payments are initiated but either fail or remain in a pending state without updating the order status. * Solution: This often relates to Callback URLs or IPN (Instant Payment Notification) settings. Ensure your website's callback URLs are correctly configured in your Khalti/eSewa merchant panel and within the plugin settings. Your hosting server must be able to receive these callbacks. If you're with Hosting Nepal, our support team can help verify server-side configurations.

4. Plugin Conflicts

* Problem: Other plugins on your WordPress site might conflict with the payment gateway plugins, causing unexpected behavior. * Solution: Temporarily deactivate other plugins one by one to identify the conflicting one. Once identified, look for an alternative plugin or contact the plugin developers for a fix. Always keep your WordPress, WooCommerce, and all plugins updated to their latest versions.

5. SSL Certificate Issues

* Problem: Payment gateways require a secure connection (HTTPS). If your site doesn't have a valid SSL certificate, transactions might fail or be blocked. * Solution: Ensure your website has a valid SSL certificate installed and that your site URL uses https://. Hosting Nepal provides free Let's Encrypt SSL certificates with all hosting plans, making this easy to set up.

Optimizing Your E-commerce for Khalti and eSewa Users

Beyond basic integration, consider these optimizations for a superior user experience for your Nepali customers:

* Clear Instructions: Provide clear, concise instructions on how to pay using Khalti and eSewa on your checkout page or in a dedicated FAQ section. Many users are new to online payments. * Mobile Responsiveness: A significant portion of Khalti and eSewa users access the internet via mobile. Ensure your e-commerce site is fully responsive and provides a seamless mobile checkout experience. * Promote Local Payments: Highlight the availability of Khalti and eSewa payment options prominently on your product pages and in your marketing materials to attract more Nepali customers. * Reliable Hosting: A fast and reliable hosting provider like Hosting Nepal is crucial. Slow loading times or downtime can directly impact transaction success rates and customer trust. Our servers, located in Kathmandu, ensure low latency for local users.

Conclusion

Integrating Khalti and eSewa into your Nepali e-commerce website is a fundamental step towards success in the local market. By following this step-by-step guide, Kathmandu startups, Nepal SMBs, and e-commerce operators can provide their customers with convenient, secure, and familiar payment options. Remember to register as a merchant, choose the right integration method, configure your settings carefully, and thoroughly test your setup. With robust hosting from Hosting Nepal and these essential payment gateways, your online business is well-positioned for growth in Nepal's digital economy. If you encounter any challenges, Hosting Nepal's support team is always ready to assist with server-side configurations and general guidance to ensure your payment gateways function flawlessly.

Tags
khalti
esewa
nepali e-commerce
payment gateway
kathmandu startup
nepal smb
woocommerce
online payments
H
Written by
Hosting Nepal Editorial
Editorial Team

Part of the Hosting Nepal editorial team covering web hosting, domains, VPS, and local payment workflows for Nepali businesses. Based in Kathmandu.

Ready to get started?

Launch your website with Hosting Nepal today.


On this page

Overview of Khalti and eSewa Integration for Nepali E-commerce

Why Local Payment Gateways Matter for Nepali Businesses

Step-by-Step Integration Process

Step 1: Register as a Merchant with Khalti and eSewa

Step 2: Choose Your Integration Method

Step 3: Install and Configure the Plugin (for WordPress/WooCommerce)

Step 4: Configure Plugin Settings with Merchant Credentials

Step 5: Test Your Integration

Common Issues and Troubleshooting

1. Invalid Merchant Credentials

2. Payment Gateway Not Showing at Checkout

3. Transaction Failures or Pending Status

4. Plugin Conflicts

5. SSL Certificate Issues

Optimizing Your E-commerce for Khalti and eSewa Users

Conclusion

Share
Hosting Nepal
Hosting Nepal

2026 © Marketminds Investment Group. All rights reserved.

Integrate Khalti & eSewa on Your Nepali E-commerce Site