ChargebeeAPI
Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now

Remove scheduled cancellation

Idempotency Supported
Try in API Explorer

Removes 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_term associated with it.
  • The subscription must not be a gift subscription.
  • The subscription status must be in_trial, active or non_renewing.

Impacts

Subscription

  • The scheduled cancellation is removed.
  • If the subscription status is in_trial, it does not change.
  • If the subscription status is not in_trial, it becomes active.
  • subscription.remaining_billing_cycles is set to the value of billing_cycles.
  • If contract_term is provided, then a new contract_term is created on the subscription.

Implementation Notes

Before calling this API, perform the following checks:

  • Check the cancelled_at attribute. It must be set to a future date-time, indicating that a cancellation is scheduled.
  • Ensure that the contract_term attribute is not present.
  • Confirm that the subscription status is in_trial, active or non_renewing.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/subscriptions/{subscription-id}/remove_scheduled_cancellation

Input Parameters

billing_cycles
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_cycles on the subscription's plan item price is used.
contract_term_billing_cycle_on_renewal
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 .

contract_term
Parameters for contract_term
pass parameters as contract_term[<param name>]

Returns

subscriptionSubscription object
Resource object representing subscription
customerCustomer object
Resource object representing customer
cardCard object
Resource object representing card