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.

Body

application/json
customerId
string
required

ID of the billing customer.

Example:

"bcu_01j9x2k3m4n5p6q7r8s9t0u1v2"

planId
string
required

ID of the billing plan.

Example:

"bpl_01j9x2k3m4n5p6q7r8s9t0u1v2"

startDate
string<date-time>

When to start the subscription. Defaults to now.

providerPreference
enum<string>

Override the plan's defaultProvider for this subscription.

Available options:
esewa,
khalti,
fonepay
referenceId
string

Your internal reference ID.

Example:

"subscription_abc123"

metadata
object | null

Response

Subscription created.

id
string
Example:

"sub_01j9x2k3m4n5p6q7r8s9t0u1v2"

object
enum<string>

String representing the object's type.

Available options:
subscription
status
enum<string>

Merchant-facing status. incomplete until the first invoice is paid (prepaid activation), then active; incomplete_expired if never paid within 24h. draft = future start date; trialing = within a trial window.

Available options:
incomplete,
incomplete_expired,
draft,
trialing,
active,
paused,
past_due,
cancelled,
completed
customer_id
string | null
Example:

"bcu_01j9x2k3m4n5p6q7r8s9t0u1v2"

plan_id
string | null
Example:

"bpl_01j9x2k3m4n5p6q7r8s9t0u1v2"

start_date
string<date-time> | null
current_period_start
string<date-time> | null
current_period_end
string<date-time> | null
next_invoice_at
string<date-time> | null
cancel_at_period_end
boolean
canceled_at
string<date-time> | null
paused_at
string<date-time> | null
ended_at
string<date-time> | null
trial_ends_at
string<date-time> | null
pause_reason
string | null
cancel_reason
string | null
cancel_effective_at
string<date-time> | null
billing_anchor_day
integer | null

Day-of-month the billing period anchors to, when set.

due_days_after_period_start
integer | null
provider_preference
enum<string> | null
Available options:
esewa,
khalti,
fonepay
reference_id
string | null

Your internal reference for this subscription.

quantity
integer

Seat/unit count (present on lifecycle responses).

Example:

1

customer
object | null

Expanded on retrieve; null on lifecycle mutation responses (use customer_id).

plan
object | null
pending_plan
object | null

Set when a plan change is scheduled for the next period.

latest_invoice
object | null
metadata
object | null

Arbitrary key-value pairs you attached.

livemode
boolean

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