WHMCS logoPayBridgeNP for WHMCS

eSewa and Khalti inside WHMCS

Gateway module for hosts and domain resellers running WHMCS. One install, both methods, full refund support inside admin. Extract the ZIP, activate from Apps & Integrations, paste your API key. Done.

Free & GPL-licensedNo Composer required~60 KB download

How it works

From download to live in 10 minutes

No Marketplace approval to wait on, no Composer install, no custom .htaccess rules. This is a standard WHMCS gateway module - unzip into modules/gateways, activate, configure.

01

Download the module ZIP

Click the Download module button above. The archive is about 60 KB and includes the PayBridgeNP PHP SDK vendored inside, so you don't need Composer on your server.

02

Extract into your WHMCS install

Upload the ZIP to the root of your WHMCS directory (the one containing configuration.php) and extract it. Files merge under modules/gateways/ - no existing files are overwritten.

03

Activate and paste your keys

In WHMCS admin, go to Apps & Integrations, activate PayBridgeNP, paste your sk_live_ or sk_test_ key plus the webhook signing secret, and save. Accept your first payment.

Features

What sets it apart

Nepal's existing WHMCS gateway modules either cover a single wallet or skip refund support entirely. This module doesn't.

eSewa + Khalti in one module

No per-method configuration, no duplicate webhook endpoints. Customers pick the wallet they want on the hosted checkout page - or force a single method if you prefer.

Full refunds inside admin

Click Refund on any transaction - partial refunds supported. The module calls the PayBridge refund API and writes the result into the WHMCS Gateway Log. No dashboard trips needed.

HMAC-signed webhooks

Every payment.succeeded / payment.failed event is verified with a 5-minute replay window before moving an invoice. Forged events are rejected with HTTP 400 - no unsigned fallback.

Idempotent payment application

Uses WHMCS's checkCbTransID helper so replayed webhook deliveries never double-post to tblaccounts. Safe to retry, safe to replay, safe to debug.

Gateway Log with secret scrubbing

Every API call, webhook, and refund attempt is recorded in Utilities → Logs → Gateway Log. API keys, signing secrets, and signature headers are automatically redacted - safe to share with support.

GPL-2.0-or-later

Same license family as WHMCS itself. Source code is inside the ZIP - audit, fork, or modify as you need. Vendored SDK is MIT-licensed.

Compatibility

Plays nicely with your WHMCS

Transparent up front: here's the full compatibility matrix.

WHMCS
8.0 – 8.13 (tested)
PHP
7.4 or newer
Required extensions
curl, json, ionCube Loader
Currency
NPR only
Refunds
Full + partial, from admin
Recurring billing
Not currently supported
License
GPL-2.0-or-later
Distribution
Direct ZIP download + WHMCS Marketplace

FAQ

Questions we get a lot

Is this on the WHMCS Marketplace?

Yes - the module is officially listed on the WHMCS Marketplace at marketplace.whmcs.com/product/8648-paybridgenp. You can install it from there or download directly from this page - the module is identical either way.

Which WHMCS and PHP versions are supported?

WHMCS 8.0 or newer with PHP 7.4 or newer (with ionCube Loader, which WHMCS requires anyway). Tested against WHMCS 8.13 + PHP 8.2 + ionCube 15. Most modern WHMCS hosts already meet this.

What does it cost?

The module is free. You only pay PayBridgeNP's standard transaction fees - same rates as using PayBridgeNP directly. No monthly subscription, no per-order markup, no hidden fees.

Does it support recurring / subscription billing?

Not yet. Nepali wallets don't currently support merchant-initiated charges, so WHMCS cannot auto-debit a card on your behalf. For renewals, WHMCS emails the customer an invoice that they pay interactively using the normal Pay Now flow.

Can I refund from WHMCS admin?

Yes - this is one of the main things that sets this module apart. Click Refund on a transaction, enter the amount (partial refunds work), and the module calls the PayBridge refund API directly. The refund appears in both WHMCS and your PayBridge dashboard within seconds. The official Khalti WHMCS module does NOT support this - refund is stubbed to return false.

What currencies are supported?

NPR only. Non-NPR invoices are refused by the API with a clear error. If your WHMCS is multi-currency, you can configure NPR as an additional currency and set PayBridgeNP to only appear on NPR invoices.

What if WHMCS is behind a load balancer or I'm testing locally?

The module has an optional Public Callback URL override field. If set, it uses this base URL for the return / webhook callbacks instead of the WHMCS System URL. Useful for local dev with cloudflared or ngrok tunnels, and for production installs where the internal System URL isn't internet-reachable.

Ready to install

Add PayBridgeNP to your WHMCS

Extract the ZIP into modules/gateways, activate from Apps & Integrations, paste your PayBridgeNP API key. The gateway appears on client invoices the next time they view one.