Installing the PayBridgeNP WooCommerce plugin takes about 5 minutes. You’ll download a ZIP, upload it to your WordPress admin, activate it, and paste your PayBridgeNP secret key + webhook signing secret into the gateway settings.Documentation Index
Fetch the complete documentation index at: https://docs.paybridgenp.com/llms.txt
Use this file to discover all available pages before exploring further.
Before you start
You need:- A WordPress site (5.8 or newer) running WooCommerce (7.0 or newer) on PHP 7.4 or newer
- Your store currency set to NPR (Nepalese Rupee) in WooCommerce → Settings → General
- A PayBridgeNP API key from the PayBridgeNP dashboard under Settings → API Keys (either
sk_live_…orsk_test_…) - Administrator access to your WordPress admin - the plugin upload requires
manage_optionscapability
Step 1 - Download the plugin
Download the latest release from paybridgenp.com/integrations/woocommerce by clicking the Download plugin button. You’ll get a file named:Step 2 - Upload and activate
- In your WordPress admin, go to Plugins → Add New → Upload Plugin
- Click Choose File and select the
paybridge-np-woocommerce.zipyou just downloaded - Click Install Now
- Once the upload finishes, click Activate Plugin
Step 3 - Enable and configure the gateway
- Go to WooCommerce → Settings → Payments
- You’ll see PayBridgeNP in the list of available payment methods. Click Manage next to it
-
Fill in the settings:
Field Value Enable/Disable Check the box to enable the gateway Title PayBridgeNP(or whatever you want customers to see at checkout, e.g.Pay with eSewa, Khalti, or Fonepay)Description Shown below the title on the checkout page. Defaults to Pay securely with eSewa, Khalti, and more.- edit to tasteSecret Key Paste your sk_live_…orsk_test_…key from the PayBridgeNP dashboardWebhook Signing Secret Paste your whsec_…webhook signing secret - see Step 4 below for how to get it - Click Save changes
Step 4 - Set up the webhook
The webhook is required. Without it, orders will be created but never move past On hold - they’ll sit there forever because WooCommerce is waiting for PayBridgeNP to confirm the payment server-to-server.- In your PayBridgeNP dashboard, go to Webhooks → Add endpoint
-
Set the URL to your store’s webhook endpoint:
Replace
yourstore.comwith your actual domain. The?wc-api=paybridge_webhookquery string is how WooCommerce routes the request to our gateway handler - it works regardless of your permalink structure. -
Events to subscribe to:
payment.succeededpayment.failedpayment.cancelled
- Click Create endpoint
-
PayBridgeNP shows you the signing secret (
whsec_…) exactly once. Copy it immediately. - Go back to WooCommerce → Settings → Payments → PayBridgeNP, paste the signing secret into the Webhook Signing Secret field, and click Save changes
Step 5 - Place a test order
Switch your WordPress admin to a non-admin browser (or use an incognito window) so you’re seeing the storefront as a customer would.- Add any product to your cart
- Proceed to checkout
- At the payment step, pick PayBridgeNP
- Click Place order
What should happen
- WooCommerce redirects you to the PayBridgeNP hosted checkout page
- You pick a wallet (eSewa, Khalti, or Fonepay) and complete the payment
- PayBridgeNP redirects you back to your store
- You land on the Order received page - the order shows as On hold
- Within a few seconds, the signed webhook arrives, and the order automatically moves to Processing (the normal WooCommerce state for a paid order awaiting fulfilment)
Sandbox test credentials
If you used ask_test_… key, use these built-in test credentials on the PayBridgeNP hosted checkout:
| Provider | Credential |
|---|---|
| eSewa | Any amount, merchant code EPAYTEST |
| Khalti | Phone 9800000001, PIN 1111, OTP 987654 |
Local development webhook testing
PayBridgeNP needs a publicly reachable URL to deliver webhooks. If your WordPress is running onhttp://localhost, you’ll need a tunnel tool to expose it:
https://xxx.ngrok.io/?wc-api=paybridge_webhook as your webhook endpoint URL in the PayBridgeNP dashboard. Switch it back to your real domain before going live.
Updating the plugin
When a new version ships:- Download the latest ZIP from paybridgenp.com/integrations/woocommerce
- In WordPress admin, go to Plugins → Installed Plugins
- Deactivate PayBridgeNP for WooCommerce (don’t delete - your settings will be wiped)
- Upload the new ZIP via Plugins → Add New → Upload Plugin - WordPress will ask if you want to Replace current with uploaded. Say yes.
- Reactivate the plugin
wp_options table, not in the plugin directory.
What’s next
- How it works - payment flow, order state transitions, webhook handling
- Troubleshooting - common install and runtime issues