chargebee_cancel_subscription
Cancel a subscription immediately, at term end, or on a specified date, with configurable credits and unbilled charges handling.
Instructions
Cancel a subscription (account).
API: POST /subscriptions/{subscription-id}/cancel_for_items
Args:
subscription_id: The subscription's unique ID.
cancel_option: "immediately", "end_of_term", or "specific_date".
end_of_term: Shorthand for cancel_option="end_of_term" (legacy field, kept for compatibility).
cancel_at: Unix timestamp (seconds) — required when cancel_option="specific_date".
cancel_reason_code: A reason code configured in your Chargebee site for this cancellation.
credit_option_for_current_term_charges: "prorate", "full", or "none" —
how to credit unused charges for the current term.
unbilled_charges_option: "invoice", "delete", or "carry_forward" — how
to handle unbilled usage charges.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"subscription_id": "<subscription_id>"
},
"name": "chargebee_cancel_subscription"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cancel_at | No | ||
| end_of_term | No | ||
| cancel_option | No | ||
| subscription_id | Yes | ||
| cancel_reason_code | No | ||
| unbilled_charges_option | No | ||
| credit_option_for_current_term_charges | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |