IssueInvoice writes the invoice PreviewInvoice projects.
POST/api/v1/billing/invoices/issue/:period
The write counterpart of PreviewInvoice, over the same costing path, so the document issued is the projection the operator approved.
The caller must send the total it displayed, in expected_total_cents. The service recomputes and refuses on mismatch rather than issuing a figure nobody saw: usage keeps arriving while an operator reads the screen, so a current-month total can move between projecting it and clicking issue.
Issuing twice for one month is refused by the org+period guard, which is the same guard the scheduled generator relies on.
Authorization
Context token only, reason admin_portal. The ORGANIZATION IS TAKEN FROM
THE TOKEN, never from the request.
Request
Responses
- 200
- default
A successful response.
An unexpected error response.