Hosting Nepal
Hosting Nepal
BlogNepal Business
Nepal Business
9 min read· October 27, 2026

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

Learn how to seamlessly integrate Khalti and eSewa payment gateways into your Nepali e-commerce website, enabling secure and convenient transactions for your customers across Nepal.

H

Hosting Nepal Editorial

Editorial Team · Updated Oct 27, 2026 · 1 views
How to Integrate Khalti and eSewa Payments on Your Nepali E-commerce Website: A Step-by-Step Guide

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

Integrating Khalti and eSewa payment gateways into your Nepali e-commerce website is crucial for offering local customers convenient, secure transaction options. This guide provides a step-by-step process for setting up these popular digital wallets.

Key facts: * Khalti and eSewa are the leading digital wallets in Nepal, essential for local e-commerce. * Integration typically involves obtaining merchant credentials, installing plugins/SDKs, and configuring settings. * Hosting Nepal recommends securing your e-commerce platform with SSL and a Web Application Firewall (WAF) for payment processing. * Most e-commerce platforms like WordPress/WooCommerce offer dedicated plugins for easy integration. * Transaction fees typically range from 0.5% to 2% per transaction, varying by gateway and merchant agreement.

Why Khalti and eSewa are Essential for Nepali E-commerce

For any Nepali e-commerce business, whether a Kathmandu startup or an established SMB, offering local payment options like Khalti and eSewa is non-negotiable. These digital wallets have become ubiquitous across Nepal, with millions of users relying on them for daily transactions. According to a 2025 report by the Nepal Telecommunications Authority (NTA), digital wallet penetration in urban areas like Kathmandu Valley exceeds 70% among smartphone users, making them primary payment methods for online shopping.

Benefits for Your Nepali E-commerce Business

Integrating these payment gateways provides several advantages:

* Increased Sales & Conversion Rates: Customers prefer familiar, convenient payment methods. Offering Khalti and eSewa reduces cart abandonment, as users don't need to rely solely on credit cards or bank transfers. * Wider Customer Reach: Many Nepalis, especially outside major cities, primarily use digital wallets. This expands your market to customers who might not have traditional banking facilities or prefer mobile payments. * Faster Transactions: Digital wallet payments are processed instantly, allowing for quicker order fulfillment and improved customer satisfaction. * Enhanced Trust: Displaying trusted local payment options builds confidence among Nepali consumers, signaling that your online store understands their needs.

Hosting Nepal provides robust web hosting solutions optimized for e-commerce, ensuring your website can handle secure payment processing efficiently. Our managed WordPress hosting plans are particularly popular among Nepali e-commerce operators for their speed, security, and ease of use.

Step-by-Step Integration Process for Your Online Store

Integrating Khalti and eSewa involves a few key stages, from merchant account setup to final testing. This guide focuses on a general approach applicable to most e-commerce platforms, with specific notes for popular systems like WordPress with WooCommerce.

Step 1: Obtain Merchant Accounts and API Credentials

Before any technical integration, you need to register your business with Khalti and eSewa as a merchant. This process typically involves:

1. Application: Visit the official Khalti Merchant or eSewa Merchant portals. You'll need to submit your company registration documents, PAN/VAT certificate, bank account details, and a brief description of your business. 2. Verification: Both companies will review your application. This can take a few days to a week. They may contact you for additional information or clarification. 3. Agreement & Credentials: Once approved, you'll sign a merchant agreement. You will then receive your API credentials, which usually include a Merchant ID, Secret Key, and sometimes a Public Key. Keep these secure.

Pro Tip: For a Kathmandu startup, ensure all your business registration documents are up-to-date to expedite the merchant approval process.

Step 2: Choose Your Integration Method

There are generally two ways to integrate payment gateways:

#### A. Using E-commerce Platform Plugins (Recommended for Most Nepali SMBs)

Most popular e-commerce platforms, especially WordPress with WooCommerce, have official or well-supported third-party plugins for Khalti and eSewa. This is the easiest and most common method for Nepali e-commerce websites.

* WordPress/WooCommerce: Search the WordPress plugin directory for "Khalti WooCommerce" and "eSewa WooCommerce". Install and activate the official or highly-rated plugins. These plugins usually provide dedicated settings pages where you'll input your API credentials. * Other Platforms (e.g., Shopify, OpenCart): Check their respective app stores or marketplaces for Khalti and eSewa integrations. If direct plugins aren't available, you might need to use a custom payment gateway option or consider custom development.

#### B. Custom Integration via API/SDK (For Developers and Advanced Users)

If you have a custom-built e-commerce platform or specific requirements, you can integrate directly using their Application Programming Interfaces (APIs) or Software Development Kits (SDKs). This requires programming knowledge (PHP, Python, Node.js, etc.) and a deeper understanding of web security.

* Khalti API Documentation: Refer to the Khalti Developer Documentation for detailed API endpoints and request/response formats. * eSewa API Documentation: Similarly, consult the eSewa Developer Documentation for their integration guidelines.

Step 3: Configure Plugin Settings (for Plugin Method)

After installing the plugin, navigate to its settings within your e-commerce platform's admin panel. For WooCommerce, go to WooCommerce > Settings > Payments.

1. Enable Gateway: Toggle Khalti and eSewa to "Enabled." 2. Input Credentials: Enter your Merchant ID, Secret Key, and any other required API keys provided by Khalti/eSewa. 3. Set Titles & Descriptions: Customize the payment method title (e.g., "Pay with Khalti") and description displayed to customers during checkout. 4. Sandbox/Live Mode: Ensure you're in "Sandbox" or "Test" mode during initial setup for testing, then switch to "Live" or "Production" mode once everything is verified. 5. Save Changes: Always save your configuration after making adjustments.

Step 4: Test Your Payment Gateway Integration

Thorough testing is crucial before going live. Use the sandbox/test credentials provided by Khalti and eSewa (or their test payment options) to simulate transactions.

1. Place a Test Order: As a customer, add products to your cart, proceed to checkout, and select Khalti or eSewa as the payment method. 2. Complete Payment: Follow the prompts to complete the test payment. For sandbox mode, you'll typically use specific test account numbers and PINs provided in their developer documentation. 3. Verify Order Status: After completing the payment, check your e-commerce platform's order management system. The order status should update correctly (e.g., "Processing" or "Completed"). 4. Check Merchant Dashboard: Log in to your Khalti and eSewa merchant dashboards to ensure the test transaction appears there as well. 5. Test Refunds (Optional but Recommended): If your business will offer refunds, test the refund process through your e-commerce platform and verify it reflects in your merchant dashboard.

Step 5: Go Live and Monitor

Once testing is successful, switch your payment gateways to "Live" or "Production" mode in your plugin settings. Remove any test products or orders from your site.

* Monitor Transactions: Keep a close eye on your first few live transactions. Ensure payments are processing correctly and order statuses are updating as expected. * Customer Support: Be prepared to assist customers with any payment-related queries. Providing clear instructions on how to pay with Khalti or eSewa can be helpful.

Common Issues and Troubleshooting Tips

Integrating payment gateways can sometimes present challenges. Here are some common issues faced by Nepali e-commerce operators and how to resolve them:

API Key/Credential Errors

* Symptom: "Invalid API Key," "Authentication Failed," or payments failing at the gateway. * Solution: Double-check that you've entered the correct Merchant ID, Secret Key, and any other credentials exactly as provided by Khalti/eSewa. Ensure there are no extra spaces or typos. Confirm you are using the correct credentials for "Live" vs. "Sandbox" environments.

Payment Not Redirecting or Stuck

* Symptom: After selecting Khalti/eSewa, the user isn't redirected to the payment page, or the page hangs. * Solution: * Check SSL Certificate: Ensure your website has a valid SSL certificate (HTTPS). Payment gateways often require this for security. Hosting Nepal offers free SSL certificates with all hosting plans. * Firewall/WAF: A Web Application Firewall (WAF) might be blocking the redirect. Temporarily disable strict WAF rules (if you have them) for testing, then re-enable and fine-tune. Our security solutions include WAF integration for robust protection. * Plugin Conflicts: If using WordPress, temporarily deactivate other plugins to check for conflicts. * Server Logs: Check your server's error logs (accessible via cPanel) for any relevant messages.

Order Status Not Updating

* Symptom: Customer pays, but the order remains "Pending" or doesn't change from its initial status. * Solution: * Webhook/Callback URL: Ensure your e-commerce platform's callback URL (sometimes called a webhook URL) is correctly configured in your Khalti/eSewa merchant dashboard. This URL is how the payment gateway communicates transaction status back to your website. * IP Whitelisting: Some gateways require your server's IP address to be whitelisted for callbacks. Check your merchant dashboard settings or contact their support. * Server Connectivity: Ensure your server can receive incoming connections from Khalti/eSewa. If you're using a strict firewall, you might need to allow their IP ranges.

Transaction Fees and Settlement

* Symptom: Confusion about transaction amounts or settlement times. * Solution: Review your merchant agreement with Khalti and eSewa for exact transaction fees (usually a percentage per transaction, e.g., 0.5% to 2%). Understand their settlement cycle (when funds are transferred to your bank account), which can vary from daily to weekly. For example, eSewa typically settles funds to your linked bank account within 1-2 business days.

If you encounter persistent issues, don't hesitate to contact the support teams of Khalti, eSewa, or your hosting provider (like Hosting Nepal) for assistance. Our technical support team is well-versed in common e-commerce integration challenges.

Conclusion

Integrating Khalti and eSewa payment gateways is a fundamental step for any Nepali e-commerce business aiming for success in the local market. By following this step-by-step guide, from obtaining merchant credentials to thorough testing, you can provide your customers with secure, convenient payment options. This not only boosts your sales but also solidifies your online store's presence as a trusted platform within Nepal. Remember, a reliable hosting partner like Hosting Nepal ensures your payment integrations run smoothly and securely, supporting your growth as a Kathmandu startup or established Nepali SMB.

For more guides on enhancing your Nepali e-commerce website, explore our articles on website security and performance optimization. Hosting Nepal is committed to empowering Nepali businesses with the tools and knowledge they need to thrive online.

Tags
khalti
esewa
payment gateway
nepali e-commerce
online payment nepal
wordpress woocommerce
kathmandu startup
nepal smb
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

Why Khalti and eSewa are Essential for Nepali E-commerce

Benefits for Your Nepali E-commerce Business

Step-by-Step Integration Process for Your Online Store

Step 1: Obtain Merchant Accounts and API Credentials

Step 2: Choose Your Integration Method

Step 3: Configure Plugin Settings (for Plugin Method)

Step 4: Test Your Payment Gateway Integration

Step 5: Go Live and Monitor

Common Issues and Troubleshooting Tips

API Key/Credential Errors

Payment Not Redirecting or Stuck

Order Status Not Updating

Transaction Fees and Settlement

Conclusion

Share
Hosting Nepal
Hosting Nepal

2026 © Marketminds Investment Group. All rights reserved.