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

# Plan Change | Webhook Events

> Fires when a user switches the billing plan for your installed app.

The `PlanChange` event fires whenever a user upgrades or downgrades the plan associated with your installed app. The payload includes both the previous plan ID and the new plan ID, giving you a complete picture of the transition. Use this event to adjust feature entitlements, update billing records in external systems, or trigger plan-specific onboarding or offboarding steps.

## Payload

| Field           | Type     | Description                                                  |
| --------------- | -------- | ------------------------------------------------------------ |
| `type`          | `string` | Always `"PLAN_CHANGE"`                                       |
| `appId`         | `string` | ID of the app whose plan was changed                         |
| `locationId`    | `string` | Account ID if the plan change occurred at the location level |
| `companyId`     | `string` | Company ID associated with the account                       |
| `userId`        | `string` | ID of the user who initiated the plan change                 |
| `currentPlanId` | `string` | ID of the plan the account was on before the change          |
| `newPlanId`     | `string` | ID of the plan the account has switched to                   |

## Example payload

```json theme={null}
{
  "type": "PLAN_CHANGE",
  "appId": "ve9EPM428h8vShlRW1KT",
  "locationId": "otg8dTQqGLh3Q6iQI55w",
  "companyId": "otg8dTQqGLh3Q6iQI55w",
  "userId": "otg8dTQqGLh3Q6iQI55w",
  "currentPlanId": "66a0419a0dffa47fb5f8b22f",
  "newPlanId": "77b1530b1egg58gc6g9c33g"
}
```

## Related

* [App Install](/api-reference/webhooks/app-install) — fires at initial installation and includes the starting plan
* [OAuth 2.0](/api-reference/oauth/overview) — authorization and app management overview
