Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
Parameters
- proration_
behaviorenum Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting
billing_
, or starting a trial), or if an item’scycle_ anchor=now quantity
changes. The default value iscreate_
.prorations Possible enum valuesalways_
invoice Always invoice immediately for prorations.
create_
prorations Will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions.
none
Disable creating prorations in this request.
More parameters
- clear_
usageboolean Delete all usage for the given subscription item. Allowed only when the current plan’s
usage_
istype metered
. - proration_
datetimestamp If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.
Returns
An subscription item object with a deleted flag upon success. Otherwise, this call raises an error, such as if the subscription item has already been deleted.
{ "id": "si_NcLYdDxLHxlFo7", "object": "subscription_item", "deleted": true}