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

# payment_succeeded Event

> Track when a payment is processed successfully.

Fires when a payment is processed successfully. Use this event for revenue tracking and payment analytics.

## JavaScript

```javascript theme={null}
window._upstack('track', 'payment_succeeded', {
  accountId: 'acct_abc123',
  invoiceId: 'inv_ghi012',
  subscriptionId: 'sub_def456',
  amount: 9900,
  currency: 'USD'
});
```

## Properties

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

## When to Fire

* When charge succeeds
* When invoice is paid
* When Stripe `invoice.paid` webhook fires

## Stripe Webhook

Maps to `invoice.paid` or `charge.succeeded`.
