Skip to main content

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 can accept real payments, add your merchant credentials to your project in the dashboard. PayBridgeNP uses these to initiate and verify payments on your behalf - money always lands directly in your own provider account.
You don’t need credentials for sandbox testing. Built-in test credentials are used automatically. See Sandbox Testing.

eSewa

Get your credentials

  1. Log in to your eSewa merchant account at merchant.esewa.com.np
  2. Go to Profile → Merchant Code - this is your merchantCode
  3. Go to Settings → Payment Integration to find your secretKey

Add to dashboard

  1. Go to Providers in the dashboard
  2. Click Configure next to eSewa
  3. Enter your Merchant Code and Secret Key
  4. Click Save and toggle the provider on
FieldDescription
merchantCodeYour eSewa product code
secretKeyHMAC-SHA256 secret from the eSewa merchant portal

Khalti

Get your credentials

  1. Log in to admin.khalti.com
  2. Go to API Keys
  3. Copy your Secret Key (starts with live_secret_key_)
Use keys from admin.khalti.com (live), not test-admin.khalti.com (sandbox). Live keys start with live_secret_key_.

Add to dashboard

  1. Go to Providers in the dashboard
  2. Click Configure next to Khalti
  3. Enter your Secret Key
  4. Click Save and toggle the provider on

Fonepay

Fonepay uses Dynamic QR - customers scan a QR code with their Fonepay-connected banking app to pay. No redirect, no form; the payment is confirmed via WebSocket in real time.

Get your credentials

Fonepay does not issue separate API keys. PayBridgeNP authenticates against the Fonepay merchant portal using the same credentials you use to sign in:
  1. Have your Fonepay merchant account ready at login.fonepay.com
  2. Use the same username (phone number) and password you use to log in
PayBridgeNP encrypts these credentials with AES-256-GCM at rest and uses them only to log in to the Fonepay portal on each session. We never log or expose your raw password.

Add to dashboard

  1. Go to Providers in the dashboard
  2. Click Configure next to Fonepay
  3. Enter your Fonepay Username (phone number) and Fonepay Password
  4. Click Save and toggle the provider on
FieldDescription
usernameYour Fonepay merchant phone number (the one you sign in with)
passwordYour Fonepay merchant portal password
Fonepay refunds do not have an automated API. When a refund is issued, it is recorded as Action required - you must process it manually in the Fonepay merchant panel, then mark it as completed in the PayBridgeNP dashboard under Refunds.

Verifying your setup

After adding credentials:
  1. Switch your project to live mode
  2. Create a test checkout session for a small amount (NPR 1)
  3. Complete the payment using your own account on that provider
  4. Confirm the payment appears in your provider’s merchant dashboard
If the payment succeeds end-to-end, your setup is correct.

Security

Provider credentials are encrypted at rest using AES-256-GCM. PayBridgeNP never logs or exposes your raw credentials. You can update credentials at any time from the Providers page - changes take effect immediately.

Tracking provider fees

Once your providers are configured, PayBridgeNP records the fee each provider charges on every successful payment, broken down per provider on your dashboard. eSewa requires you to set your negotiated rate; Khalti and Fonepay are automatic. See Provider Fees for the details.