Change subscription plan

Move a subscription to another plan or quantity, now or at renewal.

MCP tool chargebee_write → change_subscription_plan

write Confirm

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

Parameters: change_subscription_plan
NameTypeDescription
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.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chargebee_write",
    "arguments": {
      "operation": "change_subscription_plan",
      "arguments": {
        "subscription_id": "sub_4d7mTz",
        "item_price_id": "growth-USD-monthly",
        "quantity": 1,
        "apply": "immediately",
        "prorate": true
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "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"
    }
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.