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.
{
"charge_model": "flat_fee",
"enabled_in_hosted_pages": true,
"enabled_in_portal": true,
"free_quantity": 0,
"id": "silver",
"invoice_name": "sample plan",
"name": "Silver",
"object": "plan",
"period": 1,
"period_unit": "month",
"price": 5000,
"status": "active",
"taxable": true
}
curl https://{site}.chargebee.com/api/v1/plans \ -u {site_api_key}:\ -d id="silver" \ -d name="Silver" \ -d invoice_name="sample plan" \ -d price=5000
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/v1/plans/cb_trial \ -u {site_api_key}:\ -d invoice_name="sample plan"
curl https://{site}.chargebee.com/api/v1/plans \ -G \ -u {site_api_key}:\ --data-urlencode limit=3
curl https://{site}.chargebee.com/api/v1/plans/sub_free \ -u {site_api_key}:
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.
curl https://{site}.chargebee.com/api/v1/plans/demo_plan/delete \ -X POST \ -u {site_api_key}: