Skip to content

Create Plan

Create a pricing plan for a product.

POST /v1/products/:id/plans

Request Body

json
{
  "name": "Pro",
  "billingCycle": "yearly",
  "price": 99,
  "siteLimit": 3
}
FieldRequiredTypeDescription
nameYesstringPlan name
billingCycleYesstringe.g. monthly, yearly, lifetime
priceNonumberPlan price (default: 0)
currencyNostringISO currency code (default: USD)
siteLimitNonumberActivation seats per license (default: 1)
slugNostringGenerated from the name when omitted
shortDescriptionNostringOne-liner for pricing cards
descriptionNostringLonger description
isPublicNobooleanShow on public pricing (default: true)
originalPriceNonumberStrike-through compare-at price
badgeNostringMarketing badge, e.g. "Most popular"
polarProductIdNostringLink an existing Polar product ID
stripePriceIdNostringLink an existing Stripe price ID
statusNostringDefault: 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