- You have integrated eSewa into your WooCommerce store — but the payment callbacks keep failing on your cheap shared host.
- Here is exactly what to look for in hosting that actually works with Nepal's local payment gateways.
Nepal's digital payment ecosystem has matured rapidly. eSewa processes millions of transactions daily, Khalti has become the wallet of choice for young urban Nepalis, and ConnectIPS bridges enterprise bank transfers. But integrating these payment gateways into your website is only half the battle — your hosting infrastructure must support them reliably.
Why Payment Gateways and Hosting Are Tightly Coupled
Payment gateways like eSewa and Khalti work through server-to-server communication. When a customer completes a payment, the gateway sends an Instant Payment Notification (IPN) — an HTTP POST request — to your website's callback URL. Your server must respond within 10–30 seconds with a confirmation, or the transaction is logged as failed on the gateway side.
Common reasons this fails on cheap hosts:
- Server firewall blocks incoming POST requests from gateway IPs
- Shared hosting PHP timeout set too low (default 30s — often less in practice)
- Outbound CURL disabled or rate-limited
- SSL certificate errors on callback URL
- Server memory limits causing PHP to die mid-transaction
Technical Requirements for eSewa/Khalti Hosting
1. CURL Must Be Enabled
Both eSewa and Khalti APIs require PHP CURL for API calls. Verify with:
<?php
if (function_exists('curl_version')) {
echo "CURL is enabled: " . curl_version()["version"];
} else {
echo "CURL is NOT enabled — payment APIs will fail.";
}
2. Outbound HTTPS to Gateway Domains
Your server must be able to make outbound connections to:
epay.esewa.com.np— eSewa production APIrc-epay.esewa.com.np— eSewa sandboxkhalti.com— Khalti APIconnectips.com— ConnectIPS API
Some cheap hosts block outbound connections or route them through proxies that get blacklisted. WebsNP does not restrict outbound traffic.
3. PHP Memory Limit of at Least 256MB
WooCommerce + payment gateway plugins frequently breach the 128MB limit on cheap hosts during checkout. Set in wp-config.php:
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
4. SSL with Valid Certificate Chain
eSewa and Khalti perform SSL verification on your callback URL. A self-signed certificate or an expired Let's Encrypt certificate will cause all payment callbacks to fail silently. WebsNP's AutoSSL renews certificates automatically every 90 days.
5. Static IP or Whitelisting Support
Some gateway integrations (especially ConnectIPS enterprise) require whitelisting your server's IP address. Shared hosting providers that rotate IPs or use NAT will break these integrations. WebsNP assigns static IPs to all hosting accounts.
6. IPN Webhook Response Time Under 5 Seconds
Your callback script must process the IPN and return HTTP 200 within 5 seconds. On an overloaded shared server, this is often impossible. Test your current host's response time:
curl -o /dev/null -s -w "%{time_total}" https://yourdomain.com/payment/callback
Anything above 3 seconds is a red flag.
Setting Up eSewa on WooCommerce: Hosting Checklist
| Requirement | Why It Matters | WebsNP Status |
|---|---|---|
| PHP 8.1+ | Modern eSewa SDK requires it | ✅ PHP 8.3 available |
| CURL enabled | API communication | ✅ Enabled by default |
| 256MB+ RAM | WooCommerce checkout | ✅ 512MB on all plans |
| Auto-renewing SSL | Callback verification | ✅ AutoSSL included |
| Static server IP | Gateway whitelisting | ✅ Included |
| Outbound HTTPS | API calls to gateway | ✅ Unrestricted |
| Local data center | Faster callbacks, lower timeout risk | ✅ Nepal/India DC |
The Real Cost of Payment Failures
A 5% payment failure rate on a store doing NRS 50,000/day in transactions means NRS 2,500 in lost revenue daily — NRS 75,000/month. The "savings" from a NRS 800/year cheap host disappear in two days of failed transactions.
Payment gateway reliability is not a hosting feature — it is a business requirement. Your host either supports it fully or it is costing you money.
WebsNP has pre-tested configurations for eSewa, Khalti, and ConnectIPS on all hosting plans. Our support team has helped over 200 Nepali e-commerce stores get payment gateways working correctly. Start with a WebsNP plan or contact us to migrate your existing store.