Delete a subscription item 

Billing
Subscription Items
Delete a subscription item

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_cycle_anchor=now, or starting a trial), or if an item’s quantity changes. The default value is create_prorations.

    Possible enum values
    always_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_type is 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.

DELETE /v1/subscription_items/:id
Stripe.api_key = 'sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2'
deleted = Stripe::SubscriptionItem.delete('si_NcLYdDxLHxlFo7')
Response
{
"id": "si_NcLYdDxLHxlFo7",
"object": "subscription_item",
"deleted": true
}