> ## 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_upgraded Event

> Track when a customer upgrades to a higher-tier plan.

Fires when a customer upgrades to a higher-tier plan. Use this event to measure expansion revenue and upsell success.

## JavaScript

```javascript theme={null}
window._upstack('track', 'subscription_upgraded', {
  subscriptionId: 'sub_def456',
  accountId: 'acct_abc123',
  planId: 'plan_business_monthly',
  planName: 'Business',
  previousPlanId: 'plan_pro_monthly',
  mrr: 19900,
  mrrDelta: 10000
});
```

## Properties

| Property       | Type   | Required | Description                      |
| -------------- | ------ | -------- | -------------------------------- |
| subscriptionId | string | Yes      | Subscription identifier          |
| accountId      | string | Yes      | Account identifier               |
| planId         | string | No       | New plan identifier              |
| planName       | string | No       | New plan name                    |
| previousPlanId | string | No       | Previous plan identifier         |
| mrr            | number | No       | New MRR after upgrade in cents   |
| mrrDelta       | number | No       | MRR increase in cents (positive) |

## When to Fire

* When plan changes from lower to higher tier
* When Stripe subscription item is updated with higher-priced plan
* After upgrade checkout completes

## Stripe Webhook

Maps to `customer.subscription.updated` when the new price is higher than the previous price.

<Tip>
  Track `mrrDelta` alongside `subscription_downgraded` to calculate net revenue retention.
</Tip>
