{"article":{"title":"Statements & invoices","breadcrumb":["Billing","Statements & invoices"],"body":"**What this solves**: Tells you how to get a statement you can use for reconciliation, and how to issue an invoice.\n\nStatements and invoices serve reconciliation and aren't suited to real-time debugging of a single call. To see real-time spend, go to the Analytics page or look up a generation; for formal reconciliation, trust the locked statement.\n\n### Confirm three things before reconciling\n\n1. **Whether the period is locked.** An unlocked period's numbers can still change.\n2. **Whether coverage is sufficient.** When coverage is insufficient, the amount on the statement is only a lower bound.\n3. **Whether the invoice title is filled in.** Once an invoice is issued, it won't change with later edits to the title.\n\n### Recommended reconciliation flow\n\n1. Open the Billing / Statements page.\n2. Pick a locked period.\n3. Review coverage and the top-up notes.\n4. Download the statement, or pull it via the [Reconciliation API](integration-api).\n5. If you need an invoice, confirm the invoice title and download it.\n6. If you find cost coverage is insufficient, top up cost prices first, then handle the difference per the notes on the statement.\n\n### Details\n\n#### Statements are locked, reports are real-time\n\nThe Billing page recomputes every time it's opened: add a cost price today and last month's numbers change with it. That's good for analysis, not for reconciliation.\n\n**Statements** are the opposite: the numbers freeze at the end of a period and don't change afterward. If there's a correction, it doesn't rewrite history either — it's recorded in the current period as **only** a top-up line, noting which month it came from.\n\n> [!WARNING]\n> Only locked periods count as statements. The current month is computed in real time and will change. Reconciliation only trusts locked periods.\n\nDaily statements are for cost allocation and never carry a top-up: if both daily and monthly statements carried top-ups, a late cost-price correction would be counted twice.\n\n#### Coverage\n\nEvery statement gives the proportion it didn't cover: how many calls had no upstream cost. When this value is greater than zero, the statement amount is a lower bound.\n\nA statement that knew it was incomplete at the time is a different thing from one that's only found to be under-counted after the fact.\n\n#### Invoices\n\nDownload the invoice from the statement line (`GET /v1/billing/statements/{period}/invoice`). An invoice has a number, a title, and a tax amount, and can't be modified once issued, so:\n\n- **One number per period, never changing.** Downloading it repeatedly gives the same one.\n- **You fill in the title** (`GET` / `PUT /v1/billing/invoice-profile`). The platform only has your login email, not your company name, registration number, or address, so it can't issue an invoice until you fill them in.\n- **Editing the title doesn't affect invoices already issued.** They keep the information from the moment of issuance, staying consistent with the one in your finance system.\n- **The tax amount is computed from the country you enter**; enter it wrong and it's computed wrong. The platform can't check this one for you, so fill it in before issuing.\n\n#### The Billing page's own read endpoints\n\n`GET /v1/billing/account` and `GET /v1/billing/movements` are the logged-in session endpoints behind the Billing page: they read the same account balance and ledger as `/v1/integration/balance` and `/transactions` in the [Reconciliation API](integration-api), except that they identify you by your login session instead of the reconciliation key. For automated reconciliation use those two reconciliation API endpoints; these two authenticate with the login session and are suited to querying directly from your own scripts.\n\nEach month in `account` also carries a `byProductLine` breakdown; the portion without a product-line label stays `null` as-is and isn't rewritten to a string like `\"unknown\"`. \"No product line recorded\" and \"there really is a product line called unknown\" are two different things. `movements` supports narrowing the query with `productLine`, `from` / `to` (ISO-8601 timestamps).\n\nThe cost curve chart on the Billing page is fed by `GET /v1/billing/cost-series?from=…&to=…&granularity=DAY|HOUR|MINUTE` (default `HOUR`). Each granularity has its own window cap: `MINUTE` 6 hours, `HOUR` 31 days, `DAY` 366 days; exceeding it returns a 400 rather than silently truncating. A truncated segment looks exactly like \"no spend during this period\" on the chart.\n\n> [!WARNING]\n> This curve counts only AI usage. A cloud host's monthly package fee is a one-time charge, showing as a spike on the day rather than a plateau spanning the whole month; that part is in the monthly summary in `account`, not this chart. When this endpoint can't answer, it returns an empty curve plus a reason rather than a 500, and the rest of the page (balance, monthly summary) still shows what it should.\n\n### Next steps\n\n- Want automated reconciliation: read [Reconciliation API](integration-api).\n- Want to understand how charges are computed: read [Billing rules](billing).\n- Want to break spend down by business line: read [Cost attribution](attribution).\n"}}