Skip to main content
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 the Authorization header.
Authorization: Bearer <your_jwt_token>

Body Parameters

name
string
required
A human-readable name for the subscription plan (e.g., Pro Monthly, Enterprise Yearly).
amount
number
required
The recurring payment amount per billing interval.
currency
string
required
The fiat currency for the plan. Supported values: USD, LKR.
interval
string
required
The billing interval. Accepted values: daily, weekly, monthly, yearly.
trialDays
integer
Number of free trial days before the first billing cycle begins. Defaults to 0.
description
string
A description of what the plan includes. Displayed to customers on the checkout page.

Response

id
string
Unique identifier for the subscription plan.
name
string
The plan name.
amount
number
The recurring amount.
currency
string
The plan currency.
interval
string
The billing interval.
trialDays
integer
Number of trial days.
description
string
The plan description.
active
boolean
Whether the plan is currently active and accepting new subscribers.
createdAt
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"
}