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

> Track when a subscription record is created in your billing system.

Fires when a subscription record is created in your billing system. This may precede first payment for trials.

## JavaScript

```javascript theme={null}
window._upstack('track', 'subscription_created', {
  subscriptionId: 'sub_def456',
  accountId: 'acct_abc123',
  planId: 'plan_pro_monthly',
  planName: 'Pro Plan',
  billingInterval: 'month'
});
```

## Properties

| Property        | Type   | Required | Description                       |
| --------------- | ------ | -------- | --------------------------------- |
| subscriptionId  | string | Yes      | Subscription identifier           |
| accountId       | string | Yes      | Account identifier                |
| planId          | string | Yes      | Plan identifier                   |
| planName        | string | No       | Plan display name                 |
| billingInterval | string | No       | `day`, `week`, `month`, or `year` |

## When to Fire

* When subscription object is created in Stripe
* May precede first payment (for trials)
* After checkout session completes

## Stripe Webhook

Maps to `customer.subscription.created`.
