> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# subscriptions_cancel

> Cancel a subscription immediately. To stop it at the end of the period instead, update it with `cancel_at_period_end` rather than cancelling here.

<div className="tool-route"><span className="tool-row-method" data-method="DELETE">DELETE</span><code>{"https://api.stripe.com/v1/subscriptions/{subscription}"}</code></div>

```python stripe_subscriptions_cancel.py theme={null}
from charter.packs import stripe

result = await stripe.subscriptions_cancel.ainvoke({"subscription": ...})
```

## Path parameters

<div className="reference-table">
  | Field                                                                | Type     | Description                           |
  | -------------------------------------------------------------------- | -------- | ------------------------------------- |
  | `subscription` <span className="required" title="required">\*</span> | `string` | The ID of the subscription to cancel. |
</div>

## Body

<div className="reference-table">
  | Field                 | Type                                                                                   | Description                                                                                                |
  | --------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
  | `invoiceNow`          | `boolean`                                                                              | Whether to invoice now for un-invoiced metered usage and pending proration items. Absent, Stripe does not. |
  | `prorate`             | `boolean`                                                                              | Whether to credit the unused time remaining in the period. Absent, Stripe does not.                        |
  | `cancellationDetails` | [CancellationDetails](/charter/charter/packs/stripe/subscriptions/objects#cancellationdetails) | Why the subscription was cancelled.                                                                        |
</div>
