API Reference
- Getting started
- Add-ons
- Analytics
- Billable metrics
- Coupons
- Credit notes
- Customer usage
- Customers
- Events
- Fees
- Invoices
- Organizations
- Payment requests
- Plans
- Resources
- Subscriptions
- Taxes
- Wallets
- Webhook endpoints
- Webhooks
Create a plan
This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The name of the plan.
Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name.
The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: yearly
, quarterly
, monthly
, or weekly
.
The description on the plan.
The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
The duration in days during which the base cost of the plan is offered for free.
This field determines the billing timing for the plan. When set to true
, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to false
, the base cost of the plan is due at the end of each billing period.
This field, when set to true
, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan's interval is yearly
.
List of unique code used to identify the taxes.
Minimum commitment for this plan.
The amount of the minimum commitment in cents.
Specifies the name that will be displayed on an invoice. If no value is set for this field, the default name will be used as the display name.
List of unique code used to identify the taxes.
Additional usage-based charges for this plan.
List of usage thresholds to apply to the plan.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Response
Was this page helpful?