curl -X GET "https://olp-api.nipuntheekshana.com/v1/subscription-plans?active=true" \
-H "Authorization: Bearer <your_jwt_token>"
{
"plans": [
{
"id": "plan_abc123def456",
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"subscriberCount": 42,
"active": true,
"createdAt": "2026-03-01T10:00:00Z"
},
{
"id": "plan_xyz789ghi012",
"name": "Enterprise Yearly",
"amount": 299.00,
"currency": "USD",
"interval": "yearly",
"trialDays": 30,
"subscriberCount": 8,
"active": true,
"createdAt": "2026-02-15T08:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"totalPages": 1
}
}
Subscriptions
List Subscription Plans
Retrieve all subscription plans for the authenticated merchant
GET
/
v1
/
subscription-plans
curl -X GET "https://olp-api.nipuntheekshana.com/v1/subscription-plans?active=true" \
-H "Authorization: Bearer <your_jwt_token>"
{
"plans": [
{
"id": "plan_abc123def456",
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"subscriberCount": 42,
"active": true,
"createdAt": "2026-03-01T10:00:00Z"
},
{
"id": "plan_xyz789ghi012",
"name": "Enterprise Yearly",
"amount": 299.00,
"currency": "USD",
"interval": "yearly",
"trialDays": 30,
"subscriberCount": 8,
"active": true,
"createdAt": "2026-02-15T08:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"totalPages": 1
}
}
Authentication
This endpoint requires a Bearer token in theAuthorization header.
Authorization: Bearer <your_jwt_token>
Query Parameters
integer
default:"1"
The page number for pagination.
integer
default:"20"
The number of plans per page. Maximum value is
100.boolean
Filter by plan status. Set to
true to return only active plans, or false for inactive plans.Response
array
An array of subscription plan objects.
Show plan fields
Show plan fields
string
Unique identifier for the plan.
string
The plan name.
number
The recurring amount.
string
The plan currency.
string
The billing interval.
integer
Number of trial days.
integer
The number of active subscribers on this plan.
boolean
Whether the plan is active.
string
ISO 8601 timestamp of when the plan was created.
object
Pagination metadata.
curl -X GET "https://olp-api.nipuntheekshana.com/v1/subscription-plans?active=true" \
-H "Authorization: Bearer <your_jwt_token>"
{
"plans": [
{
"id": "plan_abc123def456",
"name": "Pro Monthly",
"amount": 29.99,
"currency": "USD",
"interval": "monthly",
"trialDays": 14,
"subscriberCount": 42,
"active": true,
"createdAt": "2026-03-01T10:00:00Z"
},
{
"id": "plan_xyz789ghi012",
"name": "Enterprise Yearly",
"amount": 299.00,
"currency": "USD",
"interval": "yearly",
"trialDays": 30,
"subscriberCount": 8,
"active": true,
"createdAt": "2026-02-15T08:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"totalPages": 1
}
}