Skip to main content
POST
Create plan

Authorizations

Authorization
string
header
required

Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'

Body

application/json
name
string
required

Name of the plan

Example:

"Pro Plan"

period_amount
string
required

Price per billing period in USD (high precision decimal as string). Use "0" for free plans.

Example:

"49.00"

billing_interval
enum<string>
required

How often the subscription is billed

Available options:
day,
week,
month,
year
Example:

"month"

rollover_type
enum<string>

Whether unused included credit rolls over to the next billing cycle. Defaults to "none".

Available options:
full,
none
bundle_rollover_type
enum<string>

Whether unused bundle credit rolls over to the next billing cycle. Defaults to "none".

Available options:
full,
none
included_credit
string

Credit included per billing cycle in USD (high precision decimal as string). Defaults to period_amount.

default_auto_top_up_bundle_id
string | null

ID of an existing credit bundle to set as the default auto top-up bundle. When creating with new bundles, use default_auto_top_up_bundle_index instead.

default_auto_top_up_bundle_index
integer | null

Zero-based index into the credit_bundles array to set as the default auto top-up bundle. Use this when creating new bundles alongside the config.

meter_ids
string[]

Meter IDs to link to this plan

credit_bundles
object[]

Credit bundles to create with this configuration

Response

Plan created

plan_id
string
required

Unique identifier for the plan

merchant_id
string
required

Merchant ID that owns this plan

name
string
required

Name of the plan

period_amount
string
required

Period amount in USD (high precision decimal as string)

included_credit
string
required

Included credit per billing cycle in USD (high precision decimal as string)

billing_interval
enum<string>
required

How often the subscription is billed

Available options:
day,
week,
month,
year
rollover_type
enum<string>
required

Cycle rollover: whether unused included credit rolls to next cycle

Available options:
full,
none
bundle_rollover_type
enum<string>
required

Bundle rollover: whether unused bundle credit rolls to next cycle

Available options:
full,
none
default_auto_top_up_bundle_id
string | null
required

ID of the credit bundle that will be auto-purchased when a subscription cycle runs out of credit. Null if auto top-up is disabled.

linked_meters
object[]
required

Meters linked to this plan

credit_bundles
object[]
required

Credit bundles available for this plan

created_at
string<date-time>
required

When the plan was created