Appearance
Create Plan
Create a pricing plan for a product.
POST /v1/products/:id/plansRequest Body
json
{
"name": "Pro",
"billingCycle": "yearly",
"price": 99,
"siteLimit": 3
}| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | Plan name |
billingCycle | Yes | string | e.g. monthly, yearly, lifetime |
price | No | number | Plan price (default: 0) |
currency | No | string | ISO currency code (default: USD) |
siteLimit | No | number | Activation seats per license (default: 1) |
slug | No | string | Generated from the name when omitted |
shortDescription | No | string | One-liner for pricing cards |
description | No | string | Longer description |
isPublic | No | boolean | Show on public pricing (default: true) |
originalPrice | No | number | Strike-through compare-at price |
badge | No | string | Marketing badge, e.g. "Most popular" |
polarProductId | No | string | Link an existing Polar product ID |
stripePriceId | No | string | Link an existing Stripe price ID |
status | No | string | Default: active |
Response
json
{
"data": {
"id": "plan_xxx"
}
}Example
bash
curl -X POST "https://api.packedge.dev/v1/products/prd_xxx/plans" \
-H "Authorization: Bearer pk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro",
"billingCycle": "yearly",
"price": 99,
"siteLimit": 3
}'Notes
- Creating does not push the plan to Stripe/Polar — call Sync Plan afterward to create the provider products
