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.
Installation
paybridgenp and paybridge-np are available as aliases.
Authentication
paybridgenp login
Authenticate with your API key. You can find your keys in the dashboard under Settings → API Keys.
PAYBRIDGE_API_KEY environment variable always takes priority over the saved config.
Config is stored at:
- macOS/Linux:
~/.config/paybridgenp/config.json - Windows:
%APPDATA%\paybridgenp\config.json
0600 permissions - readable only by you.
paybridgenp status
Show the current authentication state and API connection.
Payments
paybridgenp payments list
List recent payments in a table.
| Flag | Default | Description |
|---|---|---|
--limit <n> | 20 | Number of results (max 100) |
--watch | off | Poll and redraw every 5 seconds |
paybridgenp payments get <id>
Fetch a single payment with full detail.
Webhooks
paybridgenp webhooks list
List all registered webhook endpoints for the current project.
paybridgenp webhooks listen
Start a local HTTP server and expose it via an ngrok tunnel. Use this during development to receive real webhook events on your machine.
| Flag | Default | Description |
|---|---|---|
--port <n> | 4242 | Local port to listen on |
--secret <whsec_...> | none | Verify incoming HMAC signatures |
--forward <url> | none | Forward verified events to another local URL |
ngrok must be installed. Install it with
brew install ngrok or from ngrok.com.paybridgenp webhooks test <url>
Send a fake signed event to any URL to test your webhook handler.
| Flag | Default | Description |
|---|---|---|
--secret <whsec_...> | none | Sign the payload (recommended) |
--event <type> | payment.succeeded | Event type to send |
--amount <paisa> | 10000 | Amount in the payload |
| Event | Description |
|---|---|
payment.succeeded | Successful payment |
payment.failed | Failed payment attempt |
payment.cancelled | Customer cancelled |
payment.refunded | Refund issued |
Testing
paybridgenp test
Create a real sandbox checkout session and open it in the browser. Complete a test payment end-to-end without writing any code.
| Flag | Default | Description |
|---|---|---|
--amount <paisa> | 1000 | Amount in paisa (NPR 10.00) |
--no-open | off | Print URL without opening the browser |
Scaffolding
paybridgenp init
Interactively scaffold a starter project with working checkout and webhook routes.
| Flag | Description |
|---|---|
--name <name> | Project directory name |
--framework <framework> | nextjs, node, or bare |
Next.js (App Router)
Next.js (App Router)
Node.js
Node.js
Bare TypeScript
Bare TypeScript
Updates
paybridgenp update
Check if a newer version is available on npm.
Global flags
These flags work with every command:| Flag | Description |
|---|---|
--debug | Print full error stack traces instead of friendly messages |
--version | Print the CLI version |
--help | Show help for any command |
Configuration reference
| Source | Priority | How to set |
|---|---|---|
PAYBRIDGE_API_KEY env var | 1 (highest) | export PAYBRIDGE_API_KEY=sk_... |
| Config file | 2 | Set by paybridgenp login |