Skip to main content
POST
/
v1
/
billing
/
plans
curl
curl -X POST https://api.paybridgenp.com/v1/billing/plans \
  -H "Authorization: Bearer pk_sandbox_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Monthly",
    "amount": 99900,
    "intervalUnit": "month",
    "trialDays": 14
  }'
{
  "id": "bp_01j9x2k3m4n5p6q7r8s9t0u1v2",
  "livemode": true,
  "name": "Pro Monthly",
  "description": "<string>",
  "amount": 99900,
  "currency": "NPR",
  "intervalUnit": "day",
  "intervalCount": 1,
  "gracePeriodDays": 3,
  "trialDays": 14,
  "active": true,
  "defaultProvider": "esewa",
  "dunningSettings": {
    "reminderDaysBeforeDue": 123,
    "overdueReminderIntervalDays": 123,
    "overdueAction": "keep_active"
  },
  "metadata": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

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.

Authorizations

Authorization
string
header
required

Your PayBridge API key. Obtain one from the dashboard under Settings → API Keys. Prefix: pk_sandbox_ for testing, pk_live_ for production.

Body

application/json
name
string
required
Example:

"Pro Monthly"

amount
integer
required

Recurring charge in paisa.

Example:

99900

intervalUnit
enum<string>
required
Available options:
day,
week,
month,
quarter,
year
Example:

"month"

description
string | null
currency
string
default:NPR
intervalCount
integer
default:1

How many intervalUnits per billing cycle. 2 + month = every 2 months.

gracePeriodDays
integer
default:0

Days after due date before triggering overdue action.

trialDays
integer

Free trial period in days (0–365).

Example:

14

defaultProvider
enum<string> | null
Available options:
esewa,
khalti,
connectips,
hamropay
reminderDaysBeforeDue
integer

Send payment reminder this many days before invoice due date (0–30).

Example:

3

overdueReminderIntervalDays
integer

Repeat overdue reminders every N days (0–30).

overdueAction
enum<string>
default:mark_past_due

Action to take when a subscription goes overdue.

Available options:
keep_active,
mark_past_due,
pause,
cancel
metadata
object

Response

Plan created.

id
string
Example:

"bp_01j9x2k3m4n5p6q7r8s9t0u1v2"

livemode
boolean

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

name
string
Example:

"Pro Monthly"

description
string | null
amount
integer

Recurring amount in paisa.

Example:

99900

currency
string
Example:

"NPR"

intervalUnit
enum<string>
Available options:
day,
week,
month,
quarter,
year
intervalCount
integer
default:1
Example:

1

gracePeriodDays
integer
Example:

3

trialDays
integer
Example:

14

active
boolean
defaultProvider
enum<string> | null
Available options:
esewa,
khalti,
connectips,
hamropay
dunningSettings
object
metadata
object
createdAt
string<date-time>
updatedAt
string<date-time>