Change subscription plan
Move a subscription to another plan or quantity, now or at renewal.
PATCH https://cotlet.dev/api/v1/chargebee/item-prices/{item_price_id}/subscriptions/{subscription_id}/plan
Applies the change in Chargebee's Edit Subscription flow and returns the subscription and any invoice the change created. With apply set to immediately and prorate true, Chargebee credits the unused time on the old plan and charges the new plan for the rest of the term, so the invoice total is the difference. With next_renewal, nothing is invoiced until the renewal. Mandatory addons of the old plan stay unless you remove them. The customer sees the new invoice, so by default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| subscription_id string required | string | Subscription ID from list_subscriptions. |
| item_price_id string required | string | The plan price to move to, for example growth-USD-monthly. |
| quantity integer | integer | Units of the plan. Default: the current quantity. |
| apply enum | enum | immediately or next_renewal. Default: immediately. |
| prorate boolean | boolean | With apply set to immediately: credit unused time and charge the new plan for the rest of the term. Default: your site setting. |
| replace_items boolean | boolean | true replaces all items with the one you send, false adds it. Default: true. |
Request
curl -X PATCH https://cotlet.dev/api/v1/chargebee/item-prices/growth-USD-monthly/subscriptions/sub_4d7mTz/plan \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"quantity":1,"apply":"immediately","prorate":true}' result = client.call("chargebee", "change_subscription_plan", {"subscription_id":"sub_4d7mTz","item_price_id":"growth-USD-monthly","quantity":1,"apply":"immediately","prorate":True}) const result = await cotlet.call('chargebee', 'change_subscription_plan', {"subscription_id":"sub_4d7mTz","item_price_id":"growth-USD-monthly","quantity":1,"apply":"immediately","prorate":true}); cotlet call chargebee change_subscription_plan --data '{"subscription_id":"sub_4d7mTz","item_price_id":"growth-USD-monthly","quantity":1,"apply":"immediately","prorate":true}' Example response
{
"subscription": {
"subscription_id": "sub_4d7mTz",
"status": "active",
"items": [
{
"item_price_id": "growth-USD-monthly",
"quantity": 1,
"unit_price": 29900
}
],
"next_billing_at": "2026-11-01T00:00:00Z"
},
"invoice": {
"invoice_id": "INV-1043",
"status": "payment_due",
"line_items": [
{
"description": "Growth plan, prorated charge",
"amount": 14950
},
{
"description": "Starter plan, unused time credit",
"amount": -4950
}
],
"total": 10000,
"currency_code": "USD"
}
}