Pricing Tables
Create Pricing Table
Create a new pricing table with associated plans. Requires at least one plan ID. Slugs must be unique per merchant.
Authorization
bearerAuth AuthorizationBearer <token>
Use your secret API key as the bearer token
In: header
Request Body
application/json
name*string
slug?string
planIds?array<string>
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.getlumen.dev/v1/pricing-tables" \ -H "Content-Type: application/json" \ -d '{ "name": "Main Pricing", "slug": "main-pricing", "description": "Our pricing plans", "heading": "Choose Your Plan", "subheading": "Simple, transparent pricing", "isActive": true, "planIds": [ "plan_abc123", "plan_def456" ], "planConfigs": [ { "planId": "plan_abc123", "displayOrder": 1, "isPopular": false, "buttonText": "Get Started" }, { "planId": "plan_def456", "displayOrder": 2, "isPopular": true, "popularText": "Most Popular", "buttonText": "Start Free Trial" } ] }'{
"pricingTable": {
"id": "string",
"name": "string",
"slug": "string",
"plans": [
{
"id": "string",
"stablePlanId": "string",
"planName": "string",
"description": "string",
"interval": "month",
"versionNumber": 0,
"isActive": true,
"features": [
{
"slug": "string",
"displayName": "string",
"featureType": "boolean",
"limitValue": 0,
"creditAmount": 0
}
],
"prices": [
{
"id": "string",
"planId": "string",
"currency": "string",
"unitAmountCents": 0,
"billingInterval": "month",
"pricingModel": "flat",
"stripePriceId": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
],
"createdAt": "2019-08-24T14:15:22Z"
}
],
"createdAt": "2019-08-24T14:15:22Z"
},
"planAssociations": [
{
"id": "string",
"pricingTableId": "string",
"planId": "string",
"displayOrder": 0,
"isPopular": true,
"popularText": "string",
"buttonText": "string",
"buttonOutline": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"message": "string"
}{
"error": "Invalid plan IDs",
"details": "The following plan IDs do not exist or don't belong to this merchant: plan_invalid123"
}{
"error": "A pricing table with this slug already exists"
}{
"error": "Failed to create pricing table"
}