> ## 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.

# trial_ending_soon Event

> Track when a trial is about to expire (typically 3 days before).

Fires when a trial is about to expire (typically 3 days before). Use this event to trigger conversion campaigns and win-back flows.

## JavaScript

```javascript theme={null}
window._upstack('track', 'trial_ending_soon', {
  accountId: 'acct_abc123',
  trialDaysRemaining: 3,
  planId: 'plan_pro_monthly',
  trialEndDate: '2026-03-04T14:30:00.000Z'
});
```

## Properties

| Property           | Type   | Required | Description           |
| ------------------ | ------ | -------- | --------------------- |
| accountId          | string | Yes      | Account identifier    |
| trialDaysRemaining | number | Yes      | Days until expiry     |
| planId             | string | No       | Trial plan identifier |
| trialEndDate       | string | No       | Trial expiration date |

## When to Fire

* 3 days before trial expires (common)
* When Stripe sends `customer.subscription.trial_will_end`
* When automated warning email triggers

## Stripe Webhook

Maps to `customer.subscription.trial_will_end`.
