Skip to main content
POST
curl

Authorizations

Authorization
string
header
required

Your PayBridgeNP API key. Obtain one from the dashboard under Settings → API Keys. Prefix: sk_test_ for testing, sk_live_ for production.

Headers

Idempotency-Key
string

A unique key to safely retry the request without creating duplicate links.

Body

application/json
title
string
required

Shown on the payment page.

Maximum string length: 100
Example:

"Donation"

description
string | null
Maximum string length: 500
amount
integer | null

Fixed amount in paisa. Omit to let the customer enter an amount (then use minAmount/maxAmount).

Example:

10000

minAmount
integer | null

Minimum customer-entered amount in paisa.

maxAmount
integer | null

Maximum customer-entered amount in paisa (max NPR 100,000).

currency
enum<string>
default:NPR
Available options:
NPR
provider
enum<string> | null

Lock to a provider, or omit to let the customer pick.

Available options:
esewa,
khalti,
fonepay
maxUses
integer | null

Usage cap. Omit for unlimited.

Required range: 1 <= x <= 10000
expiresAt
string<date-time> | null

ISO date; must be in the future and within 1 year.

redirectUrl
string<uri> | null

https:// URL the customer is sent to after a successful payment.

inactiveMessage
string | null
Maximum string length: 300
metadata
object | null

Arbitrary key-value data (max 4 KB).

customerName
string | null
Maximum string length: 100
customerEmail
string<email> | null
customerPhone
string | null
Maximum string length: 20
referenceId
string | null

Your internal identifier.

Maximum string length: 100
collectAddress
boolean

Collect a billing address on the checkout page.

Response

Payment link created.

id
string
Example:

"lnk_01j9x2k3m4n5p6q7r8s9t0u1v2"

livemode
boolean

true when created with a live key, false for sandbox.

mode
enum<string>
Available options:
sandbox,
live
title
string

Shown on the payment page.

Example:

"Donation"

description
string | null
amount
integer | null

Fixed amount in paisa. null when the customer enters their own amount (see minAmount/maxAmount).

Example:

10000

minAmount
integer | null

Minimum customer-entered amount in paisa (only when amount is null).

maxAmount
integer | null

Maximum customer-entered amount in paisa (only when amount is null).

currency
string
Example:

"NPR"

provider
enum<string> | null

Locked provider, or null if the customer picks.

Available options:
esewa,
khalti,
fonepay
active
boolean
maxUses
integer | null

Usage cap, or null for unlimited.

usedCount
integer

Number of completed payments through this link.

Example:

0

expiresAt
string<date-time> | null
redirectUrl
string<uri> | null

Where the customer is sent after a successful payment.

inactiveMessage
string | null

Shown when the link is not usable.

customerName
string | null

Pre-filled on the checkout page.

customerEmail
string | null
customerPhone
string | null
collectAddress
boolean
customerLine1
string | null
customerLine2
string | null
customerCity
string | null
customerState
string | null
customerPostalCode
string | null
customerCountry
string | null
referenceId
string | null

Your internal identifier for this link.

metadata
object | null
url
string<uri>

Public hosted payment page for this link.

Example:

"https://paybridgenp.com/pay/lnk_01j9x2k3m4n5p6q7r8s9t0u1v2"

createdAt
string<date-time>
updatedAt
string<date-time>