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

# subscription_churned Event

> Track when a subscription ends completely (no longer billing).

Fires when a subscription ends completely (no longer billing). This is the final churn event for calculating churn rate.

## JavaScript

```javascript theme={null}
window._upstack('track', 'subscription_churned', {
  subscriptionId: 'sub_def456',
  accountId: 'acct_abc123',
  planId: 'plan_pro_monthly',
  cancelReason: 'switched_competitor',
  mrr: 9900,
  ltv: 118800,
  subscriptionMonths: 12
});
```

## Properties

| Property           | Type   | Required | Description                      |
| ------------------ | ------ | -------- | -------------------------------- |
| subscriptionId     | string | Yes      | Subscription identifier          |
| accountId          | string | Yes      | Account identifier               |
| planId             | string | No       | Churned plan                     |
| cancelReason       | string | No       | Churn reason                     |
| mrr                | number | No       | Lost MRR in cents                |
| ltv                | number | No       | Customer lifetime value in cents |
| subscriptionMonths | number | No       | How long they were subscribed    |

## When to Fire

* When final billing period ends
* When subscription is deactivated
* When Stripe `customer.subscription.deleted` fires

## Stripe Webhook

Maps to `customer.subscription.deleted`.

<Warning>
  Use this event to calculate churn rate and analyze churn reasons. Track `ltv` to understand which customer segments have the highest lifetime value.
</Warning>
