Specifies the price with billing frequency for a subscription. Create separate plans for varied price or billing frequency. For example, if you need to charge $10 per month for a group of customers and $100 per year for another group of customers, then create separate plans for each.

Sample plan [ JSON ]

{ "id": "basic", "name": "Basic", "price": 900, "period": 1, "period_unit": "month", "trial_period": 1, "trial_period_unit": "month", "charge_model": "per_unit", "free_quantity": 0, "status": "active", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "object": "plan", "taxable": true, "currency_code": "USD" }

API Index URL GET

https://{site}.chargebee.com/api/v2/plans
id
A unique ID for your system to identify the plan.
string, max chars=100
name
The display name used in web interface for identifying the plan.
string, max chars=50
invoice_name
Display name used in invoice. If it is not configured then name is used in invoice.
optional, string, max chars=100
description
Description about the plan to show in the customer portal when users change their subscription.
optional, string, max chars=500
price
The price of the plan.
optional, in cents, min=0
currency_code
The currency code (ISO 4217 format) of the plan.
string, max chars=3
period
Defines billing frequency. Example: to bill customer every 3 months, provide "3" here.
integer, default=1, min=1
period_unit
Defines billing frequency in association with billing period.
enumerated string, default=month
Possible values are
weekCharge based on week(s).monthCharge based on month(s).yearCharge based on year(s).
trial_period
The free time window for your customer to try your product.
optional, integer, min=1
trial_period_unit
Time unit for the trial period.
optional, enumerated string
Possible values are
dayIn days.monthIn months.
pricing_model
Defines how the recurring charges for the subscription is calculated.
enumerated string, default=flat_fee
Possible values are
flat_feeCharge a single price on recurring basis.per_unitCharge the price for each unit of the plan for the subscription on recurring basis.tieredCharges a different per unit price for the quantity purchased from every tier.volumeCharges the per unit price for the total quantity purchased based on the tier under which it falls.stairstepCharges a price for a range.
free_quantity
Free quantity the subscriptions of this plan will have. Only the quantity more than this will be charged for the subscription.
integer, default=0, min=0
setup_cost
One-time setup fee charged as part of the first invoice.
optional, in cents, min=1
status
The plan state.
enumerated string, default=active
Possible values are
activeNew subscriptions can be created with the plan.archivedNo new subscriptions allowed for the plan. Existing subscriptions on this plan will remain as-is and can be migrated to another active plan if required.deletedIndicates the plan has been deleted.
archived_at
Time at which the plan was moved to archived status.
optional, timestamp(UTC) in seconds
billing_cycles
The number of billing cycles the subscription is active. The subscription is moved to non renewing state and then to cancelled state automatically.
optional, integer, min=1
redirect_url
The url to redirect on successful checkout. Eg: https://yoursite.com/success.html?plan=basic.
optional, string, max chars=500
enabled_in_hosted_pages
If true, allow checkout through plan specific hosted page URL for this plan.
boolean, default=true
enabled_in_portal
If enabled, customers can switch to this plan using the 'Change Subscription' option in the customer portal.
boolean, default=true
addon_applicability
Indicates if all or only some addons are applicable with the plan.
enumerated string, default=all
Possible values are
allAll addons are applicable with this plan.restrictedOnly addons marked as 'applicable_addons' are applicable with the plan.
tax_code
The Avalara tax codes to which items are mapped to should be provided here. Applicable only for Avalara.
optional, string, max chars=50
sku
The field is used as Product name/code in your third party accounting application. Chargebee will use it as an alternate name in your accounting application.
optional, string, max chars=100
accounting_code
This field is to capture the Account code setup in your Accounting system for integration purposes only.
optional, string, max chars=100
accounting_category1
The name of the category of your product in Xero. If you've integrated with QuickBooks, this will be the "Class". Use the format "<Category>:<Name>". E.g. "Region: North".
optional, string, max chars=100
accounting_category2
The name of the category of your product in Xero. Use the format<Category>:<Name>". E.g. "Region: North".
optional, string, max chars=100
is_shippable
If enabled, charges for this plan/addon will be added to orders.
optional, boolean, default=false
shipping_frequency_period
Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
optional, integer, min=1
shipping_frequency_period_unit
Defines the shipping frequency in association with shipping period.
optional, enumerated string
Possible values are
yearShip based on year(s).monthShip based on month(s).weekShip based on week(s).
resource_version
Version number of this resource. Each update of this resource results in incremental change of this number. This attribute will be present only if the resource has been updated after 2016-09-28.
optional, long
updated_at
Timestamp indicating when this plan was last updated. This attribute will be present only if the resource has been updated after 2016-11-09.
optional, timestamp(UTC) in seconds
invoice_notes
Invoice Notes for this resource. Read More.
optional, string, max chars=1000
taxable
Specifies if the plan should be taxed or not.
optional, boolean, default=true
tax_profile_id
Tax profile of the plan.
optional, string, max chars=50
meta_data
Additional data about this resource can be stored here in the JSON Format. Learn more.
optional, jsonobject
List of tiers for this plan(applicable only if it is tiered/volume/stairtstep pricing.
optional, list of tier
Tier attributes
starting_unit
The lower limit of a range of units for the tier.
integer, min=1
ending_unit
The upper limit of a range of units for the tier.
optional, integer
price
The price of the tier if the charge model is a stairtstep pricing , or the price of each unit in the tier if the charge model is tiered/volume pricing.
in cents, default=0, min=0
applicable_addons
Show attributes[+]
List of addons applicable with this plan.
optional, list of applicable_addon
Applicable addon attributes
id
Identifier of the addon appplicable to the plan.
string, max chars=100
attached_addons
Show attributes[+]
Indicates if the addon is attached with the plan as mandatory or recommended.
optional, list of attached_addon
Attached addon attributes
id
Identifier of the addon attached with the plan. Only recurring addons can be attached with the plan.
string, max chars=100
quantity
Quantity of the addon. Applicable only for the quantity based addons.
integer, min=1
billing_cycles
The number of billing cycles this addon will be attached to the plan.
optional, integer, min=1
type
Specifies attachment type of the addon to the plan.
enumerated string
Possible values are
recommendedAddon will be charged with this plan unless specifically removed.mandatoryAddon will be always charged with this plan.
event_based_addons
Show attributes[+]
List of addons that will be charged on occurrence of specific event on subscribing to the plan.
optional, list of event_based_addon
Event based addon attributes
id
Identifier of the addon. Multiple addons can be passed.
string, max chars=100
quantity
Addon quantity. Applicable only for the quantity based addons. Should be passed with the same index as that of associated addon id.
integer, min=1
on_event
Event on which the addon will be charged.
enumerated string
Possible values are
subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.
charge_once
If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.
boolean, default=true
Create a new plan.
Sample Request
curl  https://{site}.chargebee.com/api/v2/plans \
     -u {site_api_key}: \
     -d id="silver" \
     -d name="Silver" \
     -d invoice_name="sample plan" \
     -d price="5000"
copy
curl  https://{site}.chargebee.com/api/v2/plans \
     -u {site_api_key}: \
     -d id="silver" \
     -d name="Silver" \
     -d invoice_name="sample plan" \
     -d price="5000"

Sample Response [ JSON ]

{"plan": { "id": "silver", "name": "Silver", "invoice_name": "sample plan", "price": 5000, "period": 1, "period_unit": "month", "charge_model": "flat_fee", "free_quantity": 0, "status": "active", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "updated_at": 1528093750, "resource_version": 1528093750000, "object": "plan", "taxable": true, "currency_code": "USD" }}

URL Format POST

https://{site}.chargebee.com/api/v2/plans
id
A unique ID for your system to identify the plan.
required, string, max chars=100
name
The display name used in web interface for identifying the plan.
required, string, max chars=50
invoice_name
Display name used in invoice. If it is not configured then name is used in invoice.
optional, string, max chars=100
description
Description about the plan to show in the customer portal when users change their subscription.
optional, string, max chars=500
trial_period
The free time window for your customer to try your product.
optional, integer, min=1
trial_period_unit
Time unit for the trial period.
optional, enumerated string
Possible values are
dayIn days.monthIn months.
period
Defines billing frequency. Example: to bill customer every 3 months, provide "3" here.
optional, integer, default=1, min=1
period_unit
Defines billing frequency in association with billing period.
optional, enumerated string, default=month
Possible values are
weekCharge based on week(s).monthCharge based on month(s).yearCharge based on year(s).
setup_cost
One-time setup fee charged as part of the first invoice.
optional, in cents, min=1
price
The price of the plan.
optional, in cents, min=0
currency_code
The currency code (ISO 4217 format) of the plan.
required if Multicurrency is enabled, string, max chars=3
billing_cycles
The number of billing cycles the subscription is active. The subscription is moved to non renewing state and then to cancelled state automatically.
optional, integer, min=1
pricing_model
Defines how the recurring charges for the subscription is calculated.
optional, enumerated string, default=flat_fee
Possible values are
flat_feeCharge a single price on recurring basis.per_unitCharge the price for each unit of the plan for the subscription on recurring basis.tieredCharges a different per unit price for the quantity purchased from every tier.volumeCharges the per unit price for the total quantity purchased based on the tier under which it falls.stairstepCharges a price for a range.
free_quantity
Free quantity the subscriptions of this plan will have. Only the quantity more than this will be charged for the subscription.
optional, integer, default=0, min=0
addon_applicability
Indicates if all or only some addons are applicable with the plan.
optional, enumerated string, default=all
Possible values are
allAll addons are applicable with this plan.restrictedOnly addons marked as 'applicable_addons' are applicable with the plan.
redirect_url
The url to redirect on successful checkout. Eg: https://yoursite.com/success.html?plan=basic.
optional, string, max chars=500
enabled_in_hosted_pages
If true, allow checkout through plan specific hosted page URL for this plan.
optional, boolean, default=true
enabled_in_portal
If enabled, customers can switch to this plan using the 'Change Subscription' option in the customer portal.
optional, boolean, default=true
taxable
Specifies if the plan should be taxed or not.
optional, boolean, default=true
tax_profile_id
Tax profile of the plan.
optional, string, max chars=50
tax_code
The Avalara tax codes to which items are mapped to should be provided here. Applicable only for Avalara.
optional, string, max chars=50
sku
The field is used as Product name/code in your third party accounting application. Chargebee will use it as an alternate name in your accounting application.
optional, string, max chars=100
accounting_code
This field is to capture the Account code setup in your Accounting system for integration purposes only.
optional, string, max chars=100
accounting_category1
The name of the category of your product in Xero. If you've integrated with QuickBooks, this will be the "Class". Use the format "<Category>:<Name>". E.g. "Region: North".
optional, string, max chars=100
accounting_category2
The name of the category of your product in Xero. Use the format<Category>:<Name>". E.g. "Region: North".
optional, string, max chars=100
is_shippable
If enabled, charges for this plan/addon will be added to orders.
optional, boolean, default=false
shipping_frequency_period
Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
optional, integer, min=1
shipping_frequency_period_unit
Defines the shipping frequency in association with shipping period.
optional, enumerated string
Possible values are
yearShip based on year(s).monthShip based on month(s).weekShip based on week(s).
invoice_notes
Invoice Notes for this resource. Read More.
optional, string, max chars=1000
meta_data
Additional data about this resource can be stored here in the JSON Format. Learn more.
optional, jsonobject
status
The plan state.
optional, enumerated string, default=active
Possible values are
activeNew subscriptions can be created with the plan.archivedNo new subscriptions allowed for the plan. Existing subscriptions on this plan will remain as-is and can be migrated to another active plan if required.
tiers
Parameters for tiers. Multiple tiers can be passed by specifying unique indices.
pass parameters as tiers[<param name>][<idx:0..n>]
tiers[starting_unit][0..n]
The lower limit of a range of units for the tier.
optional, integer, min=1
tiers[ending_unit][0..n]
The upper limit of a range of units for the tier.
optional, integer
tiers[price][0..n]
The price of the tier if the charge model is a stairtstep pricing , or the price of each unit in the tier if the charge model is tiered/volume pricing.
optional, in cents, default=0, min=0
applicable_addons
Parameters for applicable_addons. Multiple applicable_addons can be passed by specifying unique indices.
pass parameters as applicable_addons[<param name>][<idx:0..n>]
applicable_addons[id][0..n]
Identifier of the addon appplicable to the plan.
optional, string, max chars=100
event_based_addons
Parameters for event_based_addons. Multiple event_based_addons can be passed by specifying unique indices.
pass parameters as event_based_addons[<param name>][<idx:0..n>]
event_based_addons[id][0..n]
Identifier of the addon. Multiple addons can be passed.
optional, string, max chars=100
event_based_addons[quantity][0..n]
Addon quantity. Applicable only for the quantity based addons. Should be passed with the same index as that of associated addon id.
optional, integer, min=1
event_based_addons[on_event][0..n]
Event on which the addon will be charged.
optional, enumerated string
Possible values are
subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.
event_based_addons[charge_once][0..n]
If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.
optional, boolean, default=true
attached_addons
Parameters for attached_addons. Multiple attached_addons can be passed by specifying unique indices.
pass parameters as attached_addons[<param name>][<idx:0..n>]
attached_addons[id][0..n]
Identifier of the addon attached with the plan. Only recurring addons can be attached with the plan.
optional, string, max chars=100
attached_addons[quantity][0..n]
Quantity of the addon. Applicable only for the quantity based addons.
optional, integer, min=1
attached_addons[billing_cycles][0..n]
The number of billing cycles this addon will be attached to the plan.
optional, integer, min=1
attached_addons[type][0..n]
Specifies attachment type of the addon to the plan.
optional, enumerated string
Possible values are
recommendedAddon will be charged with this plan unless specifically removed.mandatoryAddon will be always charged with this plan.
Resource object representing plan.
always returned

When updating plans that are already linked to an invoice or a subscription, you can only update the following parameters:

  • name
  • invoice_name
  • setup_cost
  • price
  • trial_period
  • trial_period_unit
  • redirect_url
  • enabled_in_hosted_pages
  • meta_data
Sample Request
curl  https://{site}.chargebee.com/api/v2/plans/basic \
     -u {site_api_key}: \
     -d invoice_name="sample plan"
copy
curl  https://{site}.chargebee.com/api/v2/plans/basic \
     -u {site_api_key}: \
     -d invoice_name="sample plan"

Sample Response [ JSON ]

{"plan": { "id": "basic", "name": "Basic", "invoice_name": "sample plan", "price": 900, "period": 1, "period_unit": "month", "trial_period": 1, "trial_period_unit": "month", "charge_model": "per_unit", "free_quantity": 0, "status": "active", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "updated_at": 1528093750, "resource_version": 1528093750000, "object": "plan", "taxable": true, "currency_code": "USD" }}

URL Format POST

https://{site}.chargebee.com/api/v2/plans/{plan_id}
name
The display name used in web interface for identifying the plan.
optional, string, max chars=50
invoice_name
Display name used in invoice. If it is not configured then name is used in invoice.
optional, string, max chars=100
description
Description about the plan to show in the customer portal when users change their subscription.
optional, string, max chars=500
trial_period
The free time window for your customer to try your product. If zero is passed, the trial period will be removed.
optional, integer, min=0
trial_period_unit
Time unit for the trial period.
optional, enumerated string
Possible values are
dayIn days.monthIn months.
period
Defines billing frequency. Example: to bill customer every 3 months, provide "3" here.
optional, integer, min=1
period_unit
Defines billing frequency in association with billing period.
optional, enumerated string
Possible values are
weekCharge based on week(s).monthCharge based on month(s).yearCharge based on year(s).
setup_cost
One-time setup fee charged as part of the first invoice.
optional, in cents, min=1
price
The price of the plan.
optional, in cents, min=0
currency_code
The currency code (ISO 4217 format) of the plan. Applicable if Multicurrency is enabled.
optional, string, max chars=3
billing_cycles
The number of billing cycles the subscription is active. The subscription is moved to non renewing state and then to cancelled state automatically.
optional, integer, min=1
pricing_model
Defines how the recurring charges for the subscription is calculated.
optional, enumerated string
Possible values are
flat_feeCharge a single price on recurring basis.per_unitCharge the price for each unit of the plan for the subscription on recurring basis.tieredCharges a different per unit price for the quantity purchased from every tier.volumeCharges the per unit price for the total quantity purchased based on the tier under which it falls.stairstepCharges a price for a range.
free_quantity
Free quantity the subscriptions of this plan will have. Only the quantity more than this will be charged for the subscription.
optional, integer, min=0
addon_applicability
Indicates if all or only some addons are applicable with the plan.
optional, enumerated string
Possible values are
allAll addons are applicable with this plan.restrictedOnly addons marked as 'applicable_addons' are applicable with the plan.
redirect_url
The url to redirect on successful checkout. Eg: https://yoursite.com/success.html?plan=basic.
optional, string, max chars=500
enabled_in_hosted_pages
If true, allow checkout through plan specific hosted page URL for this plan.
optional, boolean
enabled_in_portal
If enabled, customers can switch to this plan using the 'Change Subscription' option in the customer portal.
optional, boolean
taxable
Specifies if the plan should be taxed or not.
optional, boolean
tax_profile_id
Tax profile of the plan.
optional, string, max chars=50
tax_code
The Avalara tax codes to which items are mapped to should be provided here. Applicable only for Avalara.
optional, string, max chars=50
sku
The field is used as Product name/code in your third party accounting application. Chargebee will use it as an alternate name in your accounting application.
optional, string, max chars=100
accounting_code
This field is to capture the Account code setup in your Accounting system for integration purposes only.
optional, string, max chars=100
accounting_category1
The name of the category of your product in Xero. If you've integrated with QuickBooks, this will be the "Class". Use the format "<Category>:<Name>". E.g. "Region: North".
optional, string, max chars=100
accounting_category2
The name of the category of your product in Xero. Use the format<Category>:<Name>". E.g. "Region: North".
optional, string, max chars=100
is_shippable
If enabled, charges for this plan/addon will be added to orders.
optional, boolean
shipping_frequency_period
Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here.
optional, integer, min=1
shipping_frequency_period_unit
Defines the shipping frequency in association with shipping period.
optional, enumerated string
Possible values are
yearShip based on year(s).monthShip based on month(s).weekShip based on week(s).
invoice_notes
Invoice Notes for this resource. Read More.
optional, string, max chars=1000
meta_data
Additional data about this resource can be stored here in the JSON Format. Learn more.
optional, jsonobject
tiers
Parameters for tiers. Multiple tiers can be passed by specifying unique indices.
pass parameters as tiers[<param name>][<idx:0..n>]
tiers[starting_unit][0..n]
The lower limit of a range of units for the tier.
optional, integer, min=1
tiers[ending_unit][0..n]
The upper limit of a range of units for the tier.
optional, integer
tiers[price][0..n]
The price of the tier if the charge model is a stairtstep pricing , or the price of each unit in the tier if the charge model is tiered/volume pricing.
optional, in cents, min=0
applicable_addons
Parameters for applicable_addons. Multiple applicable_addons can be passed by specifying unique indices.
pass parameters as applicable_addons[<param name>][<idx:0..n>]
applicable_addons[id][0..n]
Identifier of the addon appplicable to the plan.
optional, string, max chars=100
event_based_addons
Parameters for event_based_addons. Multiple event_based_addons can be passed by specifying unique indices.
pass parameters as event_based_addons[<param name>][<idx:0..n>]
event_based_addons[id][0..n]
Identifier of the addon. Multiple addons can be passed.
optional, string, max chars=100
event_based_addons[quantity][0..n]
Addon quantity. Applicable only for the quantity based addons. Should be passed with the same index as that of associated addon id.
optional, integer, min=1
event_based_addons[on_event][0..n]
Event on which the addon will be charged.
optional, enumerated string
Possible values are
subscription_creationAddon will be charged on subscription creation.subscription_trial_startAddon will be charged when the trial period starts.plan_activationAddon will be charged on plan activation.subscription_activationAddon will be charged on subscription activation.
event_based_addons[charge_once][0..n]
If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.
optional, boolean
attached_addons
Parameters for attached_addons. Multiple attached_addons can be passed by specifying unique indices.
pass parameters as attached_addons[<param name>][<idx:0..n>]
attached_addons[id][0..n]
Identifier of the addon attached with the plan. Only recurring addons can be attached with the plan.
optional, string, max chars=100
attached_addons[quantity][0..n]
Quantity of the addon. Applicable only for the quantity based addons.
optional, integer, min=1
attached_addons[billing_cycles][0..n]
The number of billing cycles this addon will be attached to the plan.
optional, integer, min=1
attached_addons[type][0..n]
Specifies attachment type of the addon to the plan.
optional, enumerated string
Possible values are
recommendedAddon will be charged with this plan unless specifically removed.mandatoryAddon will be always charged with this plan.
Resource object representing plan.
always returned
This API fetches all the active and archived plans. If the limit parameter is not set, it will return upto 10 plans. .
Sample Request
curl  https://{site}.chargebee.com/api/v2/plans \
     -G  \
     -u {site_api_key}: \
     --data-urlencode limit="5" \
     --data-urlencode trial_period[is_not]="14" \
     --data-urlencode trial_period_unit[is]="day" \
     --data-urlencode addon_applicability[is]="all" \
     --data-urlencode status[is]="active"
copy
curl  https://{site}.chargebee.com/api/v2/plans \
     -G  \
     -u {site_api_key}: \
     --data-urlencode limit="5" \
     --data-urlencode trial_period[is]="14" \
     --data-urlencode trial_period_unit[is]="day" \
     --data-urlencode addon_applicability[is_not]="all" \
     --data-urlencode status[is]="active"

Sample Response [ JSON ]

{ "list": [ {"plan": { "id": "basic", "name": "Basic", "invoice_name": "sample plan", "price": 900, "period": 1, "period_unit": "month", "trial_period": 1, "trial_period_unit": "month", "charge_model": "per_unit", "free_quantity": 0, "status": "active", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "updated_at": 1528093750, "resource_version": 1528093750000, "object": "plan", "taxable": true, "currency_code": "USD" }}, {..} ], "next_offset": "[\"900\",\"124000000090\"]" }

URL Format GET

https://{site}.chargebee.com/api/v2/plans
limit
Limits the number of resources to be returned.
optional, integer, default=10, min=1, max=100
offset
Allows you to fetch the next set of resources. The value used for this parameter must be the value returned for next_offset parameter in the previous API call.
optional, string, max chars=1000
Filter Params
For operator usages, see the Pagination and Filtering section.
id[<operator>]
To filter based on Plan Id.
Supported operators : is, is_not, starts_with, in, not_in

Example id[is] = "Enterprise"
optional, string filter
name[<operator>]
To filter based on Plan Name.
Supported operators : is, is_not, starts_with, in, not_in

Example name[is] = "plan_enterprise"
optional, string filter
price[<operator>]
To filter based on Plan Price.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example price[gt] = "1200"
optional, in cents filter
period[<operator>]
To filter based on Plan Period.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example period[lt] = "3"
optional, integer filter
period_unit[<operator>]
To filter based on Plan Period Unit. Possible values are : week, month, year.
Supported operators : is, is_not, in, not_in

Example period_unit[is] = "month"
optional, enumerated string filter
trial_period[<operator>]
To filter based on Plan Trial Period.
Supported operators : is, is_not, lt, lte, gt, gte, between, is_present

Example trial_period[is] = "14"
optional, integer filter
trial_period_unit[<operator>]
To filter based on Plan Trial Period Unit. Possible values are : day, month.
Supported operators : is, is_not, in, not_in

Example trial_period_unit[is] = "day"
optional, enumerated string filter
addon_applicability[<operator>]
To filter based on Plan Addon Applicability. Possible values are : all, restricted.
Supported operators : is, is_not, in, not_in

Example addon_applicability[is] = "all"
optional, enumerated string filter
pricing_model[<operator>]
To filter based on Plan Pricing Model. Possible values are : flat_fee, per_unit, tiered, volume, stairstep.
Supported operators : is, is_not, in, not_in

Example pricing_model[is_not] = "flat_fee"
optional, enumerated string filter
status[<operator>]
To filter based on Plan State. Possible values are : active, archived, deleted.
Supported operators : is, is_not, in, not_in

Example status[is] = "active"
optional, enumerated string filter
updated_at[<operator>]
To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09.
Supported operators : after, before, on, between

Example updated_at[on] = "1243545465"
optional, timestamp(UTC) in seconds filter
Resource object representing plan.
always returned
next_offset
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter “offset”.
optional, string, max chars=1000
Retrieve a specific plan using the id.
Sample Request
curl  https://{site}.chargebee.com/api/v2/plans/basic \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/plans/basic \
     -u {site_api_key}:

Sample Response [ JSON ]

{"plan": { "id": "basic", "name": "Basic", "invoice_name": "sample plan", "price": 900, "period": 1, "period_unit": "month", "trial_period": 1, "trial_period_unit": "month", "charge_model": "per_unit", "free_quantity": 0, "status": "active", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "updated_at": 1528093750, "resource_version": 1528093750000, "object": "plan", "taxable": true, "currency_code": "USD" }}

URL Format GET

https://{site}.chargebee.com/api/v2/plans/{plan_id}
Resource object representing plan.
always returned

Sample admin console URL

https://{site}.chargebee.com/admin-console/plans/basic

When a plan that already has subscriptions/invoices linked to it is deleted, it does not get completely purged but is instead moved to "Archived" state. No other subscriptions can use this plan but subscriptions already on it will continue to renew. Once a plan has been archived, it cannot be edited or used again and the plan cannot be un-archived.

If no subscriptions or invoices are linked to a plan, the plan will be permanently deleted from your Chargebee site. This action cannot be undone.

If a plan that is an applicable item for a coupon is deleted, then the plan will be removed from that coupon's list of applicable items.

Archiving a plan will not affect coupons in anyway.

Sample Request
curl  https://{site}.chargebee.com/api/v2/plans/silver/delete \
     -X POST  \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/plans/silver/delete \
     -X POST  \
     -u {site_api_key}:

Sample Response [ JSON ]

{"plan": { "id": "silver", "name": "Silver", "invoice_name": "sample plan", "price": 5000, "period": 1, "period_unit": "month", "charge_model": "flat_fee", "free_quantity": 0, "status": "deleted", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "updated_at": 1528093750, "resource_version": 1528093750000, "object": "plan", "taxable": true, "currency_code": "USD" }}

URL Format POST

https://{site}.chargebee.com/api/v2/plans/{plan_id}/delete
Resource object representing plan.
always returned

Creates a plan in this site by copying its configurations from another site. Copying of archived plans is not supported.

Note: The attribute tax_profile_id is not copied. In effect, if the plan is taxable, it will be mapped to the Primary tax profile.

This API is not enabled for live sites by default. Please contact support@chargebee.com to get this enabled.
Sample Request
curl  https://{site}.chargebee.com/api/v2/plans/copy \
     -u {site_api_key}: \
     -d from_site="acme-test" \
     -d id_at_from_site="basic"
copy
curl  https://{site}.chargebee.com/api/v2/plans/copy \
     -u {site_api_key}: \
     -d from_site="acme-test" \
     -d id_at_from_site="basic"

Sample Response [ JSON ]

{"plan": { "id": "cbdemo_scale", "name": "Scale", "invoice_name": "Plan - Scale", "description": "This is enterprise level plan comes with a 14-day trial period and has a setup cost.", "price": 27900, "period": 6, "period_unit": "month", "trial_period": 14, "trial_period_unit": "day", "charge_model": "flat_fee", "free_quantity": 0, "setup_cost": 20000, "status": "active", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "updated_at": 1528093750, "resource_version": 1528093750000, "object": "plan", "taxable": false, "currency_code": "USD" }}

URL Format POST

https://{site}.chargebee.com/api/v2/plans/copy
from_site
Your Chargebee site name having the plan to be copied.
Note: Unless you are copying from a twin site (acme & acme-test are twin sites), please contact support@chargebee.com to have this white-listed.
required, string, max chars=50
id_at_from_site
Id of the plan to be copied. The new plan created in this site will have the same Id.
required, string, max chars=100
id
Id of copied plan in this site.
optional, string, max chars=100
for_site_merging
If copy action is performed as part of Chargebee site merge action, pass the value as true.
optional, boolean, default=false
Resource object representing plan.
always returned
Unarchives a specific plan using the id.
Sample Request
curl  https://{site}.chargebee.com/api/v2/plans/basic/unarchive \
     -X POST  \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/plans/basic/unarchive \
     -X POST  \
     -u {site_api_key}:

Sample Response [ JSON ]

{"plan": { "id": "basic_v2", "name": "Basic Plan 2", "price": 1000, "period": 1, "period_unit": "month", "charge_model": "per_unit", "free_quantity": 0, "status": "active", "enabled_in_hosted_pages": true, "enabled_in_portal": true, "updated_at": 1528093750, "resource_version": 1528093750000, "object": "plan", "taxable": true, "currency_code": "USD" }}

URL Format POST

https://{site}.chargebee.com/api/v2/plans/{plan_id}/unarchive
Resource object representing plan.
always returned