VoidInvoice cancels an invoice.
POST/api/v1/billing/invoices/:id/void
Voids an invoice, making it null and void. Use this for incorrectly issued invoices or when charges need to be cancelled. Voided invoices remain in the system for audit purposes.
Authorization
Requires billing:admin permission.
Behavior
- Updates invoice status to 'void'
- Records void reason for audit trail
- Does not affect already recorded payments (handle separately)
Response
Returns voided Invoice.
Errors
- NOT_FOUND: Invoice does not exist
- FAILED_PRECONDITION: Invoice already paid (must refund first)
- PERMISSION_DENIED: Caller lacks billing:admin permission
Request
Responses
- 200
- default
A successful response.
An unexpected error response.