What Is an Invoice?
An invoice in Commerce is a formal record of an amount owed by a client. Every chargeable event in the system — placing an order, renewing a service, or being charged a manual fee — produces an invoice. Clients pay invoices through the client portal; admins manage them from the admin area.
How Invoices Are Created
Invoices are created from three sources:
| Source | Trigger | Linked to service? |
|---|---|---|
| New order | Client completes checkout | Yes |
| Recurring renewal | commerce:generate-renewal-invoices (daily 00:00) |
Yes |
| Manual invoice | Admin creates one manually | No |
Renewal invoices are generated automatically within the renewal window (default 7 days before next due date, configurable in Settings → Billing). Manual invoices are useful for one-off charges and custom services.
Invoice Record Fields
Every invoice contains:
- Invoice number — configurable prefix, year, and padded sequence (e.g.
INV-2026-00042) - Client — the account the invoice belongs to
- Status —
draft,unpaid,paid,overdue,cancelled, orrefunded - Issue date and due date
- Line items — description, quantity, unit price, tax rate, line total
- Subtotal, tax total, grand total
- Currency — set at invoice creation, cannot be changed afterwards
- Payments — list of payments received against this invoice
- Notes — internal or client-visible notes
[!IMPORTANT] All monetary values are stored as BIGINT cents in the database.
10000means$100.00. This prevents floating-point rounding errors across currencies.
Where to Find Invoices
Admin area — /admin/invoices
The admin invoice list shows all invoices across all clients. Use the filter bar to narrow by:
- Status (draft, unpaid, paid, overdue, cancelled, refunded)
- Client name or email
- Date range (issue date or due date)
- Currency
Click any invoice row to open the detail view, where you can record payments, download a PDF, send a reminder, or change the status manually.
Client portal — /client/invoices
Clients see only their own invoices. Unpaid and overdue invoices are highlighted at the top. Each invoice row shows the number, amount, due date, and status. Clicking an invoice opens the payment page.
Invoice Numbering
Invoice numbers follow a configurable scheme: prefix + year + zero-padded sequence. The scheme is set in Admin → Settings → Billing → Invoice Settings. See Invoice Numbering Scheme for full details.
Email Notifications
When a new invoice is created (order or renewal), Commerce automatically sends an Invoice Created email to the client — provided email templates are configured at Admin → Email Templates. The email includes the invoice number, amount due, and a direct link to the payment page.
[!TIP] If you are setting up Commerce for the first time, configure your email templates before placing test orders so that clients receive notifications correctly from day one.