If you're a developer setting up payments for a Nepali product, you have two main approaches: integrate Khalti and eSewa directly, or use PayBridgeNP as a unified layer. This is an honest comparison, including the cases where direct integration is actually the better choice.
Direct Integration: How It Works
Both Khalti and eSewa provide REST APIs for merchant payment processing. The general flow:
- Apply for a merchant account with each provider
- Receive your merchant credentials (often a week or two per provider)
- Build a payment initiation endpoint for each
- Handle webhooks (or polling) for each
- Build a UI that shows both options
You end up maintaining two parallel integrations indefinitely.
Khalti direct integration (simplified):
import requests
# Initiate Khalti payment
response = requests.post(
"https://khalti.com/api/v2/epayment/initiate/",
headers={"Authorization": f"Key {KHALTI_SECRET_KEY}"},
json={
"return_url": "https://yoursite.com/payment/callback",
"website_url": "https://yoursite.com",
"amount": 1000, # paisa
"purchase_order_id": "ORD-001",
"purchase_order_name": "Product Name",
}
)
payment_url = response.json()["payment_url"]
eSewa direct integration:
// eSewa uses form-based POST with HMAC signature
$signature = base64_encode(hash_hmac(
'sha256',
"total_amount={$amount},transaction_uuid={$uuid},product_code={$productCode}",
$secret,
true
));
// Render a form that POSTs to eSewa's payment URL
Already you can see the APIs are completely different in structure, auth, and flow.
PayBridgeNP Integration
With PayBridgeNP, you integrate once and get both:
const session = await paybridge.checkout.create({
amount: 100000, // paisa
currency: "NPR",
customer: { name: "...", email: "..." },
returnUrl: "...",
cancelUrl: "...",
});
// Redirect to session.checkout_url - customer picks Khalti or eSewa
One API. One webhook format. One dashboard.
Direct Integration: Pros
No subscription fee: Direct integration has no PayBridgeNP plan cost. Per transaction the cost is identical either way - you pay only your provider's own MDR, because PayBridgeNP takes 0% per transaction - so the only difference is PayBridgeNP's flat monthly plan, which starts on a free tier (paid plans are Growth NPR 1,999/mo and Pro NPR 4,999/mo).
Full control: You control the entire UX. You can build a custom payment UI that's deeply integrated into your app's design.
No dependency on a third party: If PayBridgeNP has downtime, your direct integration is unaffected.
Simpler for single-provider products: If your product only needs Khalti (common for some use cases), integrating only Khalti directly is perfectly valid.
Direct Integration: Cons
2x the work: Every piece of logic, initiation, webhook handling, refunds, testing, error handling, needs to be built twice.
Different APIs, different quirks: Khalti and eSewa have different authentication schemes, different response formats, different error codes, and different sandbox behaviors. You're doubling your integration surface area.
2x the maintenance: Provider APIs do change. Both Khalti and eSewa have updated their APIs in recent years. With direct integration, you track two providers' changelogs and update independently.
No unified reconciliation: You get Khalti transactions in one dashboard and eSewa in another. Cross-referencing your orders requires exporting and joining two datasets.
Approval time: Each provider has a separate merchant onboarding process. Getting approved for both can take several weeks total.
PayBridgeNP: Pros
One integration, all providers: Khalti, eSewa, and Fonepay from a single API.
Faster to market: One PayBridgeNP integration instead of building and maintaining separate technical integrations for each provider.
Single webhook format: All payment events arrive with identical structure regardless of provider.
Unified reconciliation: All transactions, Khalti, eSewa, Fonepay, in one dashboard.
Refund API: One refund endpoint that routes Khalti refunds automatically and records eSewa refunds for you to complete in the eSewa merchant panel; Fonepay refunds live in the PayBridgeNP dashboard rather than the API.
Automatic SDK updates: When Khalti or eSewa update their APIs, PayBridgeNP handles it. Your integration doesn't change.
Non-provider features: Payment links, buttons, billing with reminders, MCP tools for AI agents. None of these are available from Khalti/eSewa directly.
PayBridgeNP: Cons
Monthly plan cost: Beyond the free tier, PayBridgeNP's paid plans are a flat monthly fee (Growth NPR 1,999/mo, Pro NPR 4,999/mo). PayBridgeNP takes 0% per transaction, so this is a fixed cost rather than a cut of every sale.
Additional third-party dependency: If PayBridgeNP has issues, your checkout is affected. (Enterprise plans include an SLA; the status page is public.)
Less UI flexibility: PayBridgeNP's hosted checkout is highly customizable but ultimately a hosted page. Building a fully native payment UI requires using the API more extensively.
When to Use Direct Integration
- You only need one provider (just Khalti, or just eSewa)
- You need a deeply custom payment UX that can't be achieved with a hosted checkout
- You have dedicated developer capacity to maintain multiple integrations
When to Use PayBridgeNP
- You need both Khalti and eSewa (covers most businesses)
- You want to launch faster and iterate
- You're a small team and don't want to maintain multiple provider integrations
- You use WooCommerce, Shopify, or WHMCS (plugins are available)
- You want payment links, buttons, or other features beyond basic checkout
- You want a unified dashboard for all transactions
The Bottom Line
For most Nepali businesses and developers, PayBridgeNP is the right default. The time saved (weeks of development + ongoing maintenance) easily outweighs the flat monthly plan cost.
Direct integration makes sense for products that need only one provider, require a deeply custom native payment UX, or have the dedicated developer capacity to maintain multiple integrations.
Try PayBridgeNP free. Start on the free plan - no setup fees, 0% platform fee on every transaction. Paid plans are a flat monthly fee, never a cut of your sales. See for yourself if it fits your needs before committing.