# Delete a subscription item

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

## Prerequisites

Before you can run the following code snippet, you need to call these APIs with the provided parameters to set up the prerequisite API object(s).

1. Create a payment method
POST /v1/payment_methods {"type":"card","card":{"token":"tok_visa"}}
2. Create a customer and attach the payment method
POST /v1/customers {"name":"Jenny Rosen","email":"jennyrosen@example.com","payment_method":"${node.prerequisites.createPaymentMethod.createPaymentMethod:id}","invoice_settings":{"default_payment_method":"${node.prerequisites.createPaymentMethod.createPaymentMethod:id}"}}
3. Create a product
POST /v1/products {"name":"Gold Plan"}
4. Create a price
POST /v1/prices {"product":"${node.prerequisites.createProduct.createProduct:id}","unit_amount":2000,"currency":"usd","recurring":{"interval":"month"}}
5. Create a subscription
POST /v1/subscriptions {"customer":"${node.prerequisites.createCustomer.createCustomer:id}","items":[{"price":"${node.prerequisites.createPrice.createPrice:id}"}]}
6. createSubscriptionItem
POST /v1/subscription_items {"subscription":"${node.prerequisites.createSubscription.createSubscription:id}","price":"${node.prerequisites.createPrice.createPrice:id}","quantity":2}

## Request

```curl
curl -X DELETE https://api.stripe.com/v1/subscription_items/{{SUBSCRIPTION_ITEM_ID}} \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2025-07-30.basil"
```

### Response

```json
{
  "id": "si_NcLYdDxLHxlFo7",
  "object": "subscription_item",
  "deleted": true
}
```

## Returns

An subscription item object with a deleted flag upon success. Otherwise, this call raises [an error](https://docs.stripe.com/api/subscription_items/delete.md?api-version=2025-07-30.basil#errors), such as if the subscription item has already been deleted.

## Parameters

- `clear_usage` (boolean, optional)
  Delete all usage for the given subscription item. Allowed only when the current plan’s `usage_type` is `metered`.

- `proration_behavior` (enum, optional)
  Determines how to handle [prorations](https://docs.stripe.com/docs/billing/subscriptions/prorations.md?api-version=2025-07-30.basil) 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](https://docs.stripe.com/docs/subscriptions/upgrading-downgrading.md?api-version=2025-07-30.basil#immediate-payment).

  - `none`
    Disable creating prorations in this request.

- `proration_date` (timestamp, optional)
  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](https://docs.stripe.com/api/subscription_items/delete.md?api-version=2025-07-30.basil#retrieve_customer_invoice) endpoint.
