Hosting Nepal
Hosting Nepal
BlogWordPress Hosting
WordPress Hosting
7 min read· July 13, 2026

How to Integrate Khalti and eSewa Payments in WordPress & WooCommerce: A Step-by-Step Guide for Nepali Businesses

Integrating Khalti and eSewa payment gateways into your WordPress and WooCommerce store in Nepal is crucial for local e-commerce success. This guide provides a step-by-step process to set up these popular mobile payment options, ensuring your customers can pay conveniently and securely.

H

Hosting Nepal Editorial

Editorial Team · Updated Jul 13, 2026
How to Integrate Khalti and eSewa Payments in WordPress & WooCommerce: A Step-by-Step Guide for Nepali Businesses

How to Integrate Khalti and eSewa Payments in WordPress & WooCommerce: A Step-by-Step Guide for Nepali Businesses

Integrating Khalti and eSewa payment gateways into your WordPress and WooCommerce store in Nepal is crucial for local e-commerce success, enabling convenient and secure transactions for your customers.

Key facts: * Khalti and eSewa are leading digital wallets in Nepal, essential for local e-commerce. * WooCommerce powers over 30% of all online stores globally, making it a robust platform. * Proper integration enhances customer trust and streamlines the checkout process. * Hosting Nepal offers optimized WordPress hosting perfect for e-commerce with these integrations.

Overview of Digital Payments in Nepal

Nepal's digital payment landscape has rapidly evolved, with mobile wallets like Khalti and eSewa becoming indispensable for online transactions. For any business operating an e-commerce store on WordPress, especially with WooCommerce, offering these local payment options is not just a convenience but a necessity. According to a 2025 report by the Nepal Telecommunications Authority (NTA), digital wallet transactions have seen a 45% year-over-year growth, highlighting their widespread adoption. Customers in Kathmandu and across Nepal increasingly prefer using Khalti or eSewa for everything from utility payments to online shopping, making their integration critical for your online store's success.

Integrating these payment gateways allows your website, whether built with Elementor or Gutenberg, to cater directly to the local market's payment preferences. This not only improves the user experience but also significantly boosts conversion rates by reducing cart abandonment. Many Nepali customers do not have credit cards or prefer not to use them online, making digital wallets their primary payment method. Hosting Nepal provides robust WordPress hosting solutions, including LiteSpeed servers, which ensure your WooCommerce store runs smoothly with these integrations, offering fast and reliable service.

Step-by-Step Integration of Khalti and eSewa with WooCommerce

Integrating Khalti and eSewa into your WordPress and WooCommerce store involves installing specific plugins and configuring their settings. This process is straightforward but requires attention to detail to ensure secure and functional payment processing.

1. Setting Up Your WordPress and WooCommerce Environment

Before integrating payment gateways, ensure your WordPress site with WooCommerce is fully set up and running on a reliable hosting provider. Hosting Nepal offers managed WordPress hosting plans optimized for e-commerce, providing features like LiteSpeed caching for blazing-fast performance. Ensure your SSL certificate is active (HTTPS) to secure transactions, which is a fundamental requirement for any payment gateway.

2. Installing and Activating the Payment Gateway Plugins

Both Khalti and eSewa offer dedicated WooCommerce plugins. You'll need to install and activate these from your WordPress dashboard.

* For Khalti: 1. Go to Plugins > Add New in your WordPress admin dashboard. 2. Search for "Khalti WooCommerce". 3. Click Install Now and then Activate. * For eSewa: 1. Go to Plugins > Add New. 2. Search for "eSewa WooCommerce". 3. Click Install Now and then Activate.

3. Obtaining API Credentials from Khalti and eSewa

To connect your WooCommerce store with Khalti and eSewa, you'll need API keys (Merchant ID, Secret Key, etc.) from your respective merchant accounts. Register for a merchant account on both Khalti and eSewa's official websites if you haven't already. Once registered and approved, you can find your API credentials in your merchant dashboard. These credentials are vital for secure communication between your website and the payment gateways.

4. Configuring Khalti in WooCommerce

1. Navigate to WooCommerce > Settings > Payments in your WordPress dashboard. 2. You will see "Khalti" listed. Click Manage. 3. Enable the Khalti payment gateway. 4. Enter your Khalti Merchant ID and Khalti Secret Key in the provided fields. 5. Configure other settings such as Title (e.g., "Pay with Khalti"), Description, and Payment Mode (Live or Test). 6. Save changes.

5. Configuring eSewa in WooCommerce

1. Navigate to WooCommerce > Settings > Payments. 2. Find "eSewa" and click Manage. 3. Enable the eSewa payment gateway. 4. Enter your eSewa Merchant Code (also known as Merchant ID) and other required API keys. 5. Set the Service Code or Product Code as provided by eSewa for your business. 6. Configure Title (e.g., "Pay with eSewa"), Description, and Payment Mode. 7. Save changes.

6. Testing the Payment Gateways

After configuration, it's crucial to test both payment gateways thoroughly. Switch the payment mode to "Test" (if available in the plugin settings) or use small actual transactions to ensure everything works correctly. Place a test order on your website, proceed to checkout, and attempt to pay using both Khalti and eSewa. Verify that the payment processes, the order status updates in WooCommerce, and you receive notifications. This step is critical before launching your site for live transactions.

7. Optimizing Performance for Payment-Ready Sites

For an e-commerce site accepting payments via Khalti, eSewa, and bank transfer, performance is paramount. Utilize caching plugins like LiteSpeed Cache (if on LiteSpeed servers) or WP Rocket to ensure fast loading times. Optimize your images, leverage a Content Delivery Network (CDN), and ensure your WordPress theme (whether Elementor or Gutenberg-based) is lightweight and responsive. Hosting Nepal's managed WordPress hosting includes LiteSpeed technology, providing server-level caching that significantly speeds up your WooCommerce store, crucial for a seamless checkout experience.

Common Issues and Troubleshooting

Integrating payment gateways can sometimes present challenges. Here are some common issues and their solutions:

API Key Errors

If you encounter errors related to API keys, double-check that you have entered the correct Merchant ID, Secret Key, and any other required credentials exactly as provided by Khalti and eSewa. Even a single misplaced character can cause authentication failures. Ensure there are no leading or trailing spaces.

Payment Not Redirecting or Processing

* SSL Certificate: Ensure your website has a valid SSL certificate and is running on HTTPS. Payment gateways will not function securely on HTTP. * Plugin Conflicts: Deactivate other plugins one by one to check for conflicts, especially with other payment or checkout-related plugins. Re-activate them after identifying the culprit. * Firewall Issues: Your web host's firewall or a security plugin might be blocking communication with the payment gateway servers. Contact your hosting provider's support (like Hosting Nepal's 24/7 team) to check server logs for any blocked requests. * Callback URLs: Verify that the callback or return URLs configured in your Khalti/eSewa merchant dashboard match your website's actual URLs. Incorrect URLs can prevent successful transaction completion.

Transaction Status Not Updating

This often indicates an issue with the Instant Payment Notification (IPN) or webhook communication between the payment gateway and your WooCommerce store. Check:

* Webhook Configuration: Ensure webhooks are correctly configured in your Khalti/eSewa merchant panel, pointing to your WooCommerce site's webhook listener URL (usually handled automatically by the plugin). * Server Connectivity: Confirm your server can receive incoming connections from Khalti/eSewa servers. Again, server firewalls or network issues can be culprits. * Plugin Updates: Ensure both your WooCommerce and payment gateway plugins are updated to their latest versions. Developers often release updates to fix bugs and improve compatibility.

Conclusion

Integrating Khalti and eSewa into your WordPress and WooCommerce store is a strategic move for any Nepali business looking to thrive in the local e-commerce market. By following this step-by-step guide, you can provide your customers with their preferred payment methods, enhancing trust and boosting sales. Remember to prioritize website performance with solutions like LiteSpeed caching and to regularly test your payment gateways. For reliable and fast WordPress hosting that supports your growing e-commerce needs, including seamless Khalti and eSewa integrations, consider Hosting Nepal. Our optimized environment ensures your payment-ready website delivers an excellent user experience, whether you're building with Elementor or Gutenberg, and helps you process transactions smoothly.

Tags
wordpress payments
woocommerce nepal
khalti integration
esewa integration
nepali e-commerce
payment gateway
litespeed caching
wordpress tutorial
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 Digital Payments in Nepal

Step-by-Step Integration of Khalti and eSewa with WooCommerce

1. Setting Up Your WordPress and WooCommerce Environment

2. Installing and Activating the Payment Gateway Plugins

3. Obtaining API Credentials from Khalti and eSewa

4. Configuring Khalti in WooCommerce

5. Configuring eSewa in WooCommerce

6. Testing the Payment Gateways

7. Optimizing Performance for Payment-Ready Sites

Common Issues and Troubleshooting

API Key Errors

Payment Not Redirecting or Processing

Transaction Status Not Updating

Conclusion

Share
Hosting Nepal
Hosting Nepal

2026 © Marketminds Investment Group. All rights reserved.