Skip to main content
PayBridgeNP for WooCommerce is an official WordPress plugin that adds a PayBridgeNP payment method to your WooCommerce checkout. Customers pick it like any other gateway, get redirected to PayBridgeNP’s hosted checkout, pay with eSewa / Khalti / Fonepay, and land back on your order confirmation page - the order flips to Processing automatically via a signed webhook.

Who this is for

  • You run a WooCommerce store on self-hosted WordPress
  • You want to accept eSewa, Khalti, or Fonepay from Nepali customers
  • You already have (or can create) a PayBridgeNP account with a sk_live_… or sk_test_… API key
  • Your store’s currency is NPR

What you get

  • Classic and Block checkout. Works with both, whichever your theme uses.
  • HPOS compatible. Runs on WooCommerce’s High-Performance Order Storage.
  • Signed webhooks. Every payment.succeeded / payment.failed / payment.cancelled event is checked (HMAC-SHA256) before it changes an order; forged events get a 400.
  • Sandbox mode. A sk_test_… key uses the eSewa and Khalti test environments. Fonepay has no sandbox and moves real money within the test caps.
  • Any permalink setting. Uses WooCommerce’s wc-api endpoints; no .htaccess changes.
  • GPL-2.0-or-later licensed. Same license as WordPress and WooCommerce core.

How it plugs in

The webhook confirms the payment. On a successful browser return, an unpaid order is put On hold to await confirmation. The signed payment.succeeded webhook records the transaction id and completes the payment, normally setting Processing (or Completed for virtual downloadable orders), even if the browser never comes back.

Embedded checkout (optional)

By default the plugin sends your customer to the PayBridgeNP checkout page. You can instead have payment open in an overlay on your own store, so the customer stays on your site. Turn it on under WooCommerce > Settings > Payments > PayBridgeNP with Open payment in an overlay instead of redirecting. It is off by default.

Before it will work

Two things have to be true, and if either is not, the plugin quietly falls back to the normal redirect. Your customer always gets a working checkout.
  1. Your plan includes embedded checkout. Growth and above.
  2. Your store domain is registered. Add it in the dashboard under Project > Embed domains for the mode you are using. This is what gives your store permission to display the checkout, and you can revoke it at any time by removing the domain.

What your customer sees

The overlay opens on the order payment page, after the order is created, so your stock is already reserved by WooCommerce and the total is final.
This is why the overlay is most useful if your customers pay with Fonepay. For eSewa and Khalti the overlay chooses the method and then hands off, which is a smaller gain than it sounds.

Two things that change

  • Payment method tiles become a pre-selection. With the overlay on, picking eSewa or Khalti on your checkout page selects it inside the overlay rather than sending the customer straight to that provider.
  • If anything is missing, you get the redirect. An unregistered domain, a plan without the feature, a blocked script, or JavaScript turned off all fall back to the normal hosted checkout rather than failing.

What this plugin does NOT do

Next steps

  • Install the plugin - download the ZIP, upload it to WordPress, configure the gateway
  • How it works - the payment flow, webhook handling, and order state transitions explained
  • Troubleshooting - common issues and how to fix them