Get Invoice Tenant Breakdown
Split one invoice's total across the tenants it charges for.
Use this to re-bill: the list endpoint tells you what you owe, this tells you who incurred it. Each line is traced through its subscription item to the tenant holding that license, and amounts are summed per tenant.
total_cents always equals the sum of tenants[].amount_cents plus unallocated_cents, so the split reconciles to what is actually owed rather than to a pre-tax subtotal. Charges that belong to no tenant — one-off items, invoice-level discounts, credits, tax — land in unallocated_cents, which can be negative when a credit exceeds them.
lines carries every line on the invoice regardless, each naming the tenant it reached or, in unallocated_reason, why it reached none. That is what an invoice with nothing tenant-attributable returns instead of a bare unallocated_cents equal to the total.
Draft invoices return 404.
Requires the billing_report permission.
Request
- Base URL: https://ai.hatz.ai/v1
- URL: https://ai.hatz.ai/v1/payments/invoices/{invoice_id}/breakdown
- Auth: API key in header X-API-Key
Path parameters
Stripe invoice ID, as returned by GET /payments/invoices.
Query parameters
Which of your organizations the invoice belongs to. Required only if you hold billing access to more than one.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.