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

# invoice_created Event

> Track when a new invoice is created in the billing system.

Fires when a new invoice is created in the billing system. Use this event to track billing cycles and invoice generation.

## JavaScript

```javascript theme={null}
window._upstack('track', 'invoice_created', {
  accountId: 'acct_abc123',
  invoiceId: 'inv_ghi012',
  subscriptionId: 'sub_def456',
  amount: 9900,
  currency: 'USD',
  dueDate: '2026-03-01T00:00:00.000Z'
});
```

## Properties

| Property       | Type   | Required | Description             |
| -------------- | ------ | -------- | ----------------------- |
| accountId      | string | Yes      | Account identifier      |
| invoiceId      | string | Yes      | Invoice identifier      |
| amount         | number | Yes      | Invoice amount in cents |
| subscriptionId | string | No       | Subscription identifier |
| currency       | string | No       | ISO 4217 currency code  |
| dueDate        | string | No       | ISO 8601 due date       |

## When to Fire

* When invoice is generated
* When billing cycle creates new invoice
* When Stripe `invoice.created` webhook fires

## Stripe Webhook

Maps to `invoice.created`.
