POST /plans
This endpoint creates a new plan based on the plan Id and plan name.
Servers
- {protocol}://{site}.{environment}:{port}/api/v1
- {protocol}://{site}-test.{environment}:{port}/api/v1
Request headers
Name | Type | Required | Description |
---|---|---|---|
chargebee-request-origin-device |
String | No |
The device from which the customer has made the request |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
chargebee-event-webhook |
String | No |
skip only webhooks Possible values:
|
chargebee-event-actions |
String | No |
skip all actions to be done on the events Possible values:
|
chargebee-request-origin-user |
String | No |
The email address of your customer/user. Use this when the email address has only ASCII characters. |
chargebee-request-origin-ip |
String | No |
The IP address of the customer where the request originated |
chargebee-request-origin-user-encoded |
String | No |
The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header |
chargebee-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
invoice_name |
String | No |
Display name used in invoice. If it is not configured then name is used in invoice. |
trial_period_unit |
String | No |
Time unit for the trial period. * month - In months * day - In days Possible values:
|
price |
Integer | No |
The price of the plan. The unit depends on the type of currency. |
free_quantity |
Integer | No |
Free quantity the subscriptions of this plan will have. Only the quantity more than this will be charged for the subscription. Default value: 0 |
setup_cost |
Integer | No |
One-time setup fee charged as part of the first invoice. |
description |
String | No |
Description about the plan to show in the hosted pages & customer portal. |
meta_data |
Object | No |
A set of key-value pairs stored as additional information for the plan. [Learn more](./#meta_data). |
enabled_in_hosted_pages |
Boolean | No |
If true, allow checkout through plan specific hosted page URL for this plan. Default value: true |
trial_period |
Integer | No |
The free time window for your customer to try your product. |
invoice_notes |
String | No |
A customer-facing note added to all invoices associated with this API resource. This note becomes one among all the notes displayed on the invoice PDF. |
billing_cycles |
Integer | No |
The number of billing cycles the subscription is active. The subscription is moved to non renewing state and then to cancelled state automatically. |
id |
String | Yes |
A unique ID for your system to identify the plan. |
period_unit |
String | No |
Defines billing frequency in association with billing period. * year - Charge based on year(s) * month - Charge based on month(s) * week - Charge based on week(s) * day - Charge based on day(s) Possible values:
Default value: "month" |
name |
String | Yes |
The display name used in web interface for identifying the plan. |
redirect_url |
String | No |
The url to redirect on successful checkout. Eg: https://yoursite.com/success.html?plan=basic. |
charge_model |
String | No |
Defines how the subscription recurring charge for this plan should be calculated. * flat_fee - Charge a single price on recurring basis * per_unit - Charge the price for each unit of the plan for the subscription on recurring basis. Possible values:
|
period |
Integer | No |
Defines billing frequency. Example: to bill customer every 3 months, provide "3" here. Default value: 1 |
taxable |
Boolean | No |
Specifies if the plan should be taxed or not. Default value: true |
enabled_in_portal |
Boolean | No |
If enabled, customers can switch to this plan using the 'Change Subscription' option in the customer portal. Default value: true |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.