Plans

Create a plan for a product

Changed on

Creates a plan under the product from its composable pricing options[] (charges, billing cycle, tiers, limits, entitlements, trials, discounts). Options are validated for cross-option coherence and rejected with 400 if invalid; money fields are integer minor units.

post/v1/sdk/products/{productRef}/plans

Request

Path parameters

productRefstring required
Example:prd_1A2B3C4D

Product reference or ID

Request body

accessExpiryDaysinteger
currencystring
descriptionstring
featuresobject
maxActiveUsersinteger
metadataobject
namestring required
status'active' | 'inactive' | 'archived'
taxBehavior'auto' | 'inclusive' | 'exclusive'

Response

Plan created successfully

accessExpiryDaysnumber

Access expiry in days

createdAtstring required

Creation timestamp

currencystring

Currency code (ISO 4217)

currencySymbolstring

Currency symbol (derived from currency)

descriptionstring

Plan description

featuresobject

Plan features

isActiveboolean required

Whether the plan is active (derived from status)

maxActiveUsersnumber

Maximum number of active users

namestring

Plan name

optionsobject[] required

Composable pricing options (money as integer minor units)

pricenumber

Derived headline price in minor units (the base or one-time charge)

referencestring required

Plan reference

requiresPaymentboolean

Whether payment is required

statusstring required

Plan status

type'recurring' | 'one-time' | 'usage-based' | 'hybrid' required

Derived plan type (read from options)

updatedAtstring required

Last update timestamp

Example response

{
  "currency": "USD",
  "currencySymbol": "$",
  "description": "Best for teams getting started",
  "isActive": true,
  "name": "Starter",
  "price": 2999,
  "reference": "pln_1A2B3C4D",
  "requiresPayment": true,
  "status": "active",
  "type": "recurring"
}

Changes

    • breaking

      removed subschema #4 subschema #6 subschema #8 from the / request property oneOf list

    • info

      added subschema #4 subschema #6 to the / request property oneOf list

    • breaking

      removed the enum value top_up of the request property ///

    • info

      added the new draw_credits enum value to the request property ///