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

# Earnings & analytics

> Pull revenue, transactions, and performance stats.

<Info>
  Earnings and payout endpoints are **creator-only**. Calling them from a fan
  account returns `403`.
</Info>

## Earnings

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const balances = await of.earnings.balances();
const chart = await of.earnings.chart({
  startDate: "2026-01-01",
  endDate: "2026-04-30",
});
const txs = await of.earnings.listTransactions({ limit: 100 });
```

The `earnings` resource is the analytics hub — it also exposes top-posts,
top-fans, top-stories, top-streams, top-messages, a fans-activity feed, and
per-post / per-story stats.

| Want to                 | Call                                     |
| ----------------------- | ---------------------------------------- |
| Current balances        | `earnings.balances()`                    |
| Revenue over a range    | `earnings.chart({ startDate, endDate })` |
| Transaction ledger      | `earnings.listTransactions({ limit })`   |
| Best-performing posts   | `earnings.topPosts(...)`                 |
| Highest-value fans      | `earnings.topFans(...)`                  |
| Today's activity widget | `earnings.todayActivity()`               |

## Payments & payouts

* `payments` — cards on file, transactions, withdraw, 3DS config, alternative
  methods.
* `payouts` — bank / Stripe balances and requests, DAC7, W-9, VAT documents,
  monthly invoices.
* `chargebacks` — inbound chargeback list.

## Bulk export

For large pulls, use the async export workflow:

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const job = await of.dataExports.create({ /* ... */ });
const done = await of.dataExports.waitForCompletion(job.id);
```

`dataExports` covers create / get / list / cancel / start, plus a
`waitForCompletion(id)` helper that polls until the export is ready.
