# Reconciliation

How billed spend, provider usage and app telemetry relate, and why they differ.

AI Spendbook documentation, How it works. Web page: https://www.aispendbook.com/docs/reconciliation

AI Spendbook keeps three ledgers and never adds them together:

- **Billed**: charges from provider cost reports, billing exports or invoices. When billed data exists for a day, it is the total for that day.
- **Provider usage estimate**: token usage reported by the provider, priced at published (or your contract) rates. Used for days the provider hasn't billed yet.
- **Telemetry estimate**: request-level events from your app or SDK, priced the same way. Used where there's no provider data.

Request-level data *explains* the total by customer, feature and user. The part of billed spend that request-level data doesn't cover is shown as **unattributed**. It isn't spread across customers. The reconciliation report shows, per day and provider, the billed amount, each estimate, and how far they differ.

“Billing complete through” marks the last day for which provider billing is final. Days after it are estimates and can change. If the same request arrives from two sources (for example the SDK and a database mapping), it's matched by provider request id and only counted once.

Spend on a provider project, workspace or API key that you have mapped to a customer is attributed on the mapped basis first, and the rest is split by telemetry. See [attribution and coverage](https://www.aispendbook.com/docs/attribution-and-coverage). At close, each provider's billed total can be tied out to its invoice under [close controls](https://www.aispendbook.com/docs/close-controls).
