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
}
}
Retrieve all subscription plans for the authenticated merchant
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
}
}
Authorization header.
Authorization: Bearer <your_jwt_token>
100.true to return only active plans, or false for inactive plans.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
}
}