Finalize an invoice
Finalizes a pending invoice, transitioning it to posted status. Once finalized, the invoice is ready for payment collection.
Only invoices with pending status can be finalized. Attempting to finalize an already-posted or paid invoice returns an error.