Invoice states
draft
Invoice is being prepared. Can be modified or deleted.
- No invoice number or date
- Does not affect AP/AR balances
- Can update amounts, line items, tax
- Can be deleted
finalized
Invoice is issued and official. Cannot be modified.
- Has sequential invoice number
- Has official invoice date
- Due date calculated (if payment_terms provided)
- Affects AP/AR balances
- Immutable - corrections require credit notes
cancelled
Invoice is voided. Only a finalized invoice can be cancelled, through POST /invoices/{id}/cancel. Cancelling creates an associated credit note with the same items as the cancelled invoice (see Cancelling an invoice).
State transitions
Creating an invoice
All invoices start asdraft:
Finalizing an invoice
- Invoice number assigned
- Invoice date set to today
- Due date calculated (from payment_terms)
- AP/AR balances updated
- Invoice locked from changes
Payment status
Finalized invoices track payment status:
A partially paid invoice keeps its
open or due status. The amount_remaining field shows what’s still owed.
Working with finalized invoices
Attaching payments
Invoice Payments
Cancelling an invoice
To void a finalized invoice entirely, cancel it:- The invoice status becomes
cancelled - A credit note with the same items as the invoice is created. Credit notes that already exist on the invoice do not change this
- The invoice can no longer be modified
Cancellation is only available for
finalized invoices. A draft invoice cannot be cancelled.Correcting errors
To correct only part of a finalized invoice, issue a credit note:Best practices
- Review drafts carefully before finalizing
- Finalize invoices promptly - don’t leave in
draft - Use payment_terms for automatic due date calculation
- Issue credit notes for corrections, never modify finalized invoices
- Track payment status for automated reminders
