{
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"description": "Access to all Pro features including priority support"
}
{
"id": "plan_abc123def456",
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"description": "Access to all Pro features including priority support",
"active": true,
"createdAt": "2026-03-26T14:30:00Z"
}
Subscriptions
Create Subscription Plan
Create a new recurring subscription plan for customers to subscribe to
POST
/
v1
/
subscription-plans
{
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"description": "Access to all Pro features including priority support"
}
{
"id": "plan_abc123def456",
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"description": "Access to all Pro features including priority support",
"active": true,
"createdAt": "2026-03-26T14:30:00Z"
}
Authentication
This endpoint requires a Bearer token in theAuthorization header.
Authorization: Bearer <your_jwt_token>
Body Parameters
string
required
A human-readable name for the subscription plan (e.g.,
Pro Monthly, Enterprise Yearly).number
required
The recurring payment amount per billing interval.
string
required
The fiat currency for the plan. Supported values:
USD, LKR.string
required
The billing interval. Accepted values:
daily, weekly, monthly, yearly.integer
Number of free trial days before the first billing cycle begins. Defaults to
0.string
A description of what the plan includes. Displayed to customers on the checkout page.
Response
string
Unique identifier for the subscription plan.
string
The plan name.
number
The recurring amount.
string
The plan currency.
string
The billing interval.
integer
Number of trial days.
string
The plan description.
boolean
Whether the plan is currently active and accepting new subscribers.
string
ISO 8601 timestamp of when the plan was created.
{
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"description": "Access to all Pro features including priority support"
}
{
"id": "plan_abc123def456",
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"description": "Access to all Pro features including priority support",
"active": true,
"createdAt": "2026-03-26T14:30:00Z"
}