Skip to content
<Rojit />
Technical Answer

How do you integrate Nepali payment gateways like Khalti and eSewa?

Short answer

Route each gateway through an abstraction layer: one payment interface, an adapter per provider (Khalti, eSewa, Stripe), webhook reconciliation with idempotency keys, and retry logic for failed charges.

Never hard-code a gateway into your business logic. Define a single payment interface — charge, refund, verify — and implement an adapter for each provider so switching or adding a gateway is a small change.

Each gateway has different webhook payloads and retry semantics. Normalize them behind the adapter and reconcile with idempotency keys so a retried webhook cannot double-charge.

The restaurant SaaS routes by region: Khalti or eSewa for Nepal-based restaurants, Stripe for international — all through one abstraction layer with automatic retry logic.