Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now
Idempotency Supported
Try in API ExplorerRemoves a scheduled cancellation from a subscription so that it continues billing for the specified number of billing cycles. Use this operation when a customer changes their mind about canceling their subscription.
Prerequisites & Constraints
- There must be a cancellation scheduled for the subscription.
- Do not invoke this API if the subscription has a
contract_termassociated with it. - The subscription must not be a gift subscription.
- The subscription
statusmust bein_trial,activeornon_renewing.
Impacts
Subscription
- The scheduled cancellation is removed.
- If the subscription
statusisin_trial, it does not change. - If the subscription
statusis notin_trial, it becomesactive. subscription.remaining_billing_cyclesis set to the value ofbilling_cycles.- If
contract_termis provided, then a newcontract_termis created on the subscription.
Implementation Notes
Before calling this API, perform the following checks:
- Check the
cancelled_atattribute. It must be set to a future date-time, indicating that a cancellation is scheduled. - Ensure that the
contract_termattribute is not present. - Confirm that the subscription
statusisin_trial,activeornon_renewing.
Sample Request
URL Format
POST https://[site].chargebee.com/api/v2/subscriptions/{subscription-id}/remove_scheduled_cancellation
Input Parameters
optional, integer, min=0
The number of billing cycles the subscription should remain active for after the current billing cycle. The remaining_billing_cycles attribute of the subscription is updated to this value.
Constraints
- The value must be greater than 0.
Default Value
- If not specified, the value set for
billing_cycleson the subscription's plan item price is used.
optional, integer, min=1, max=100
Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles
or a custom value depending on the site configuration
.
Returns
subscriptionSubscription object
Resource object representing subscription
customerCustomer object
Resource object representing customer
cardCard object
Resource object representing card