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
Response
An array of subscription plan objects.
Show plan fields
Show plan fields
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
}
}