Plans
Create Plan
Create a new billing plan with associated features, prices, and optional trial configuration. This is the primary way to define subscription tiers (Free, Pro, Enterprise, etc.). Plans support versioning—the initial version is v1. Features can be boolean flags, numeric limits, or usage-based with credit allowances. Prices can be recurring (monthly/yearly), one-time, or usage-based.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Request Body
application/json
planName*string
Display name
description?string
interval?string
Default
"month"Value in
"month" | "year"features?
prices?
Response Body
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/plans" \ -H "Content-Type: application/json" \ -d '{ "planName": "Pro Plan", "planDescription": "Perfect for growing teams", "currency": "USD", "monthlyPrice": 29.99, "hasYearlyPrice": false, "showInPricingTable": true, "features": [ { "featureName": "Unlimited API calls", "slug": "api_access", "isUsageBased": false }, { "featureName": "Team members", "slug": "team_members", "isUsageBased": false } ] }'{
"plan": {
"id": "pln_01hrwzqrz4ytkwv07syv8k7g3z",
"stablePlanId": "pln_stable_abc123",
"merchantId": "mrc_01hptv3p6xj173pfv96pxd5pke",
"versionNumber": 1,
"planName": "Pro Plan",
"planDescription": "Perfect for growing teams",
"commitMessage": "Initial version",
"isTrialPlan": false,
"createdAt": "2025-02-20T16:00:00.000Z",
"deletedAt": null
}
}{
"error": "Plan name is required"
}{
"error": "Failed to create plan",
"details": "Database transaction failed"
}