{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"What this solves"}]},{"type":"text","value":": Tells you how to get a statement you can use for reconciliation, and how to issue an invoice."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Statements 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Confirm three things before reconciling"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Whether the period is locked."}]},{"type":"text","value":" An unlocked period's numbers can still change."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Whether coverage is sufficient."}]},{"type":"text","value":" When coverage is insufficient, the amount on the statement is only a lower bound."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Whether the invoice title is filled in."}]},{"type":"text","value":" Once an invoice is issued, it won't change with later edits to the title."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Recommended reconciliation flow"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Open the Billing / Statements page."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Pick a locked period."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Review coverage and the top-up notes."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Download the statement, or pull it via the "},{"type":"element","tagName":"a","properties":{"href":"integration-api"},"children":[{"type":"text","value":"Reconciliation API"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"If you need an invoice, confirm the invoice title and download it."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"If you find cost coverage is insufficient, top up cost prices first, then handle the difference per the notes on the statement."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Details"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{},"children":[{"type":"text","value":"Statements are locked, reports are real-time"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Statements"}]},{"type":"text","value":" 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 "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"only"}]},{"type":"text","value":" a top-up line, noting which month it came from."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Only locked periods count as statements. The current month is computed in real time and will change. Reconciliation only trusts locked periods."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Daily 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{},"children":[{"type":"text","value":"Coverage"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Every 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{},"children":[{"type":"text","value":"Invoices"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Download the invoice from the statement line ("},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/billing/statements/{period}/invoice"}]},{"type":"text","value":"). An invoice has a number, a title, and a tax amount, and can't be modified once issued, so:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"One number per period, never changing."}]},{"type":"text","value":" Downloading it repeatedly gives the same one."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"You fill in the title"}]},{"type":"text","value":" ("},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET"}]},{"type":"text","value":" / "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"PUT /v1/billing/invoice-profile"}]},{"type":"text","value":"). 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Editing the title doesn't affect invoices already issued."}]},{"type":"text","value":" They keep the information from the moment of issuance, staying consistent with the one in your finance system."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"The tax amount is computed from the country you enter"}]},{"type":"text","value":"; enter it wrong and it's computed wrong. The platform can't check this one for you, so fill it in before issuing."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{},"children":[{"type":"text","value":"The Billing page's own read endpoints"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/billing/account"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/billing/movements"}]},{"type":"text","value":" are the logged-in session endpoints behind the Billing page: they read the same account balance and ledger as "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/integration/balance"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/transactions"}]},{"type":"text","value":" in the "},{"type":"element","tagName":"a","properties":{"href":"integration-api"},"children":[{"type":"text","value":"Reconciliation API"}]},{"type":"text","value":", 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Each month in "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"account"}]},{"type":"text","value":" also carries a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"byProductLine"}]},{"type":"text","value":" breakdown; the portion without a product-line label stays "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"null"}]},{"type":"text","value":" as-is and isn't rewritten to a string like "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"\"unknown\""}]},{"type":"text","value":". \"No product line recorded\" and \"there really is a product line called unknown\" are two different things. "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"movements"}]},{"type":"text","value":" supports narrowing the query with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"productLine"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" / "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"to"}]},{"type":"text","value":" (ISO-8601 timestamps)."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The cost curve chart on the Billing page is fed by "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/billing/cost-series?from=…&to=…&granularity=DAY|HOUR|MINUTE"}]},{"type":"text","value":" (default "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"HOUR"}]},{"type":"text","value":"). Each granularity has its own window cap: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"MINUTE"}]},{"type":"text","value":" 6 hours, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"HOUR"}]},{"type":"text","value":" 31 days, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"DAY"}]},{"type":"text","value":" 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."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"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 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"account"}]},{"type":"text","value":", 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."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Next steps"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Want automated reconciliation: read "},{"type":"element","tagName":"a","properties":{"href":"integration-api"},"children":[{"type":"text","value":"Reconciliation API"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Want to understand how charges are computed: read "},{"type":"element","tagName":"a","properties":{"href":"billing"},"children":[{"type":"text","value":"Billing rules"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Want to break spend down by business line: read "},{"type":"element","tagName":"a","properties":{"href":"attribution"},"children":[{"type":"text","value":"Cost attribution"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]}]}