Prices
Create Price
Create a new price for a plan. Prices use a flexible DSL (Domain-Specific Language) in the pricingData field to support various billing models: recurring (monthly/yearly), one-time, usage-based, seat-based (per-unit), tiered, and composite (combining multiple components). Each price is tied to a specific plan version and currency.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Request Body
application/json
planId*string
currency*string
unitAmountCents?integer
billingInterval?string
Value in
"month" | "year"pricingModel?string
Value in
"flat" | "per_seat" | "tiered" | "usage"Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/prices" \ -H "Content-Type: application/json" \ -d '{ "planId": "pln_01hrwzqrz4ytkwv07syv8k7g3z", "currency": "USD", "pricingData": { "type": "recurring", "interval": "month", "intervalCount": 1, "amountCents": 2999 } }'{
"price": {
"id": "prc_01hrwzqrz4ytkwv07syv8k7g3z",
"planId": "pln_01hrx123",
"merchantId": "mrc_01hptv3p6xj173pfv96pxd5pke",
"currency": "USD",
"pricingData": {
"type": "recurring",
"interval": "month",
"intervalCount": 1,
"amountCents": 2999
},
"isOverridePrice": false,
"clonedFromPriceId": null,
"createdAt": "2025-02-20T17:00:00.000Z",
"deletedAt": null
}
}{
"error": "Invalid pricing data: amount must be a non-negative integer"
}{
"error": "Plan not found or access denied"
}{
"error": "Failed to create price"
}