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.
{
"addon_applicability": "all",
"charge_model": "flat_fee",
"currency_code": "USD",
"enabled_in_hosted_pages": true,
"enabled_in_portal": true,
"free_quantity": 0,
"giftable": false,
"id": "silver",
"invoice_name": "sample plan",
"is_shippable": false,
"name": "Silver",
"object": "plan",
"period": 1,
"period_unit": "month",
"price": 5000,
"pricing_model": "flat_fee",
"resource_version": 1517505797000,
"show_description_in_invoices": false,
"show_description_in_quotes": false,
"status": "active",
"taxable": true,
"updated_at": 1517505797
}
<category-name>: <option>
. For example:Location: Singapore.
<parent class>:<sub-class-1>:<sub-class-2>...
<parent class> : <sub-class-1> : <sub-class2> ....
For example: Services : Plan.
<category-name>: <option>....
For example, Region: South
<parent-location>:<sub-location-1>:<sub-location-2>....
For example: Location: North America: Canada
<parent-location> : <sub-location-1>: <sub-location-2>....
For example: NA:US:CA
<parent-department> : <sub-department-1>: <sub-department-2>....
For example: Production: Assembly.
resource_version
is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.pricing_model
is flat_fee
. When the pricing model is per_unit
, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when multi-decimal pricing is enabled. plan.description
should be shown on invoice PDFs. If this Boolean is changed, only invoices generated (or regenerated )after the change are affected; past invoices are not.pricing_model
is tiered
or volume
; the total cost for the item price when the pricing_model
is stairstep
. The value is in the minor unit of the currency.ending_unit_in_decimal
of the next lower tier. Returned only when the pricing_model
is tiered
, volume
or stairstep
and multi-decimal pricing is enabled.starting_unit_in_decimal
of the next higher tier. Returned only when the pricing_model
is tiered
, volume
or stairstep
and multi-decimal pricing is enabled.pricing_model
is tiered
or volume
. When the pricing_model
is stairstep
, it is the decimal representation of the total price for the addon. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.pricing_model
other than flat_fee
.pricing_model
other than flat_fee
.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
pricing_model
is flat_fee
. When the pricing model is per_unit
, it is the price per unit quantity of the plan. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when multi-decimal pricing is enabled. .
<category-name>: <option>
. For example:Location: Singapore.
<parent class>:<sub-class-1>:<sub-class-2>...
<parent class> : <sub-class-1> : <sub-class2> ....
For example: Services : Plan.
<category-name>: <option>....
For example, Region: South
<parent-location>:<sub-location-1>:<sub-location-2>....
For example: Location: North America: Canada
<parent-location> : <sub-location-1>: <sub-location-2>....
For example: NA:US:CA
<parent-department> : <sub-department-1>: <sub-department-2>....
For example: Production: Assembly.
plan.description
should be shown on invoice PDFs. If this Boolean is changed, only invoices generated (or regenerated )after the change are affected; past invoices are not.
pricing_model
is tiered
or volume
; the total cost for the item price when the pricing_model
is stairstep
. The value is in the minor unit of the currency.
ending_unit_in_decimal
of the next lower tier. Applicable only when the pricing_model
is tiered
, volume
or stairstep
and multi-decimal pricing is enabled.
starting_unit_in_decimal
of the next higher tier. Applicable only when the pricing_model
is tiered
, volume
or stairstep
and multi-decimal pricing is enabled.
pricing_model
is tiered
or volume
. When the pricing_model
is stairstep
, it is the decimal representation of the total price for the plan. The value is in major units of the currency. Applicable when the plan is quantity-based and multi-decimal pricing is enabled.
pricing_model
other than flat_fee
.
pricing_model
other than flat_fee
.
When updating plans that are already linked to an invoice or a subscription, you can only update the following parameters:
curl https://{site}.chargebee.com/api/v2/plans/cb_trial \ -u {site_api_key}:\ -d invoice_name="sample plan"
curl https://{site}.chargebee.com/api/v2/plans/cb_trial \ -u {site_api_key}:\ -d invoice_name="sample plan"
pricing_model
is flat_fee
. When the pricing model is per_unit
, it is the price per unit quantity of the plan. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when multi-decimal pricing is enabled. .
<category-name>: <option>
. For example:Location: Singapore.
<parent class>:<sub-class-1>:<sub-class-2>...
<parent class> : <sub-class-1> : <sub-class2> ....
For example: Services : Plan.
<category-name>: <option>....
For example, Region: South
<parent-location>:<sub-location-1>:<sub-location-2>....
For example: Location: North America: Canada
<parent-location> : <sub-location-1>: <sub-location-2>....
For example: NA:US:CA
<parent-department> : <sub-department-1>: <sub-department-2>....
For example: Production: Assembly.
plan.description
should be shown on invoice PDFs. If this Boolean is changed, only invoices generated (or regenerated )after the change are affected; past invoices are not.
pricing_model
is tiered
or volume
; the total cost for the item price when the pricing_model
is stairstep
. The value is in the minor unit of the currency.
ending_unit_in_decimal
of the next lower tier. Applicable only when the pricing_model
is tiered
, volume
or stairstep
and multi-decimal pricing is enabled.
starting_unit_in_decimal
of the next higher tier. Applicable only when the pricing_model
is tiered
, volume
or stairstep
and multi-decimal pricing is enabled.
pricing_model
is tiered
or volume
. When the pricing_model
is stairstep
, it is the decimal representation of the total price for the plan. The value is in major units of the currency. Applicable when the plan is quantity-based and multi-decimal pricing is enabled.
pricing_model
other than flat_fee
.
pricing_model
other than flat_fee
.
curl https://{site}.chargebee.com/api/v2/plans \ -G \ -u {site_api_key}:\ --data-urlencode limit=3 \ --data-urlencode status[is]="active"
curl https://{site}.chargebee.com/api/v2/plans \ -G \ -u {site_api_key}:\ --data-urlencode limit=3 \ --data-urlencode status[is]="active"
offset
to the value of next_offset
obtained in the previous iteration of the API call.
curl https://{site}.chargebee.com/api/v2/plans/sub_free \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/plans/sub_free \ -u {site_api_key}:
Deletes or archives a plan. This endpoint behaves differently based on the scenarios listed below:
archived
state. Subscriptions already on it continue to renew. However, until the plan is unarchived,
curl https://{site}.chargebee.com/api/v2/plans/demo_plan/delete \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/plans/demo_plan/delete \ -X POST \ -u {site_api_key}:
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.
curl https://{site}.chargebee.com/api/v2/plans/copy \ -u {site_api_key}:\ -d from_site="merchant-test" \ -d id_at_from_site="silver-plan-new"
curl https://{site}.chargebee.com/api/v2/plans/copy \ -u {site_api_key}:\ -d from_site="merchant-test" \ -d id_at_from_site="silver-plan-new"
archived
earlier.
curl https://{site}.chargebee.com/api/v2/plans/archieved_plan/unarchive \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/plans/archieved_plan/unarchive \ -X POST \ -u {site_api_key}: