Product Plans
Product plans define what you sell and how you bill for it. Each plan can have multiple prices (e.g., monthly and annual billing). Plans are used with subscriptions.
Create a product plan
Add prices to a plan
Each price defines an amount, currency, and billing interval. A plan can have multiple prices so customers can choose between monthly, annual, etc.
Retrieve a plan
Update a plan
Update a price
Delete a price
List plans
Methods reference
| Method | Description |
|---|---|
create(params) | Create a new product plan |
retrieve(id) | Retrieve a plan with prices |
list(params?) | List all plans |
update(id, params) | Update a plan |
createPrice(planId, params) | Add a price to a plan |
updatePrice(planId, priceId, params) | Update a price |
deletePrice(planId, priceId) | Remove a price |
TypeScript types
Response body reference
All responses are wrapped in { success: true, data: ... }. The fields below describe what's inside data.
create(), update(), and list() response
ProductPlan
idstringUnique plan ID (UUID)appIdstringYour app IDnamestringPlan namedescriptionstring | nullPlan descriptionimageUrlstring | nullPlan image URLplanTypestring"ONE_TIME" or "SUBSCRIPTION"taxRateIdstring | nullDefault tax rate IDisActivebooleanWhether the plan is activemetadataobjectYour metadata key-value pairscreatedAtstringISO 8601 creation timestampupdatedAtstringISO 8601 last update timestamppricesProductPlanPrice[]All prices for this plan (sorted by sortOrder)taxRateTaxRate | nullFull tax rate object, if linkedProductPlanPrice (nested in prices[])
idstringUnique price ID (UUID)productPlanIdstringParent plan IDappIdstringYour app IDamountstringPrice amount (Decimal as string, e.g. "29.99")currencystringCurrency code, default "USD"billingIntervalstring | nullMONTH, YEAR, WEEK, or DAYbillingIntervalCountnumberIntervals between charges (e.g. 1 for monthly)trialPeriodDaysnumberFree trial days (default 0)nicknamestring | nullDisplay name, e.g. "Monthly"sortOrdernumberDisplay orderisDefaultbooleanWhether this is the default priceisActivebooleanWhether price is activemetadataobjectPrice-level metadatacreatedAtstringISO 8601 timestampupdatedAtstringISO 8601 timestampretrieve() response
Same as above plus the full app object.
Additional fields on retrieve
appAppFull app object (id, name, environment, etc.)createPrice() and updatePrice() response
Returns the single ProductPlanPrice object (no nested plan or tax rate).
deletePrice() response
Returns 204 No Content (no response body).