Blog
Sequential invoice numbers in WooCommerce
Published 1 October 2026 · Updated 10 October 2026
Disclosure: Tillpress sells OrderBay. This guide describes OrderBay Pro 1.12.2 (the current version) and OrderBay Lite 1.0 as of 1 October 2026. It is not tax advice; numbering rules depend on your country, so check them with your accountant.
WooCommerce order numbers are not invoice numbers. They skip whenever an order is abandoned or deleted, and many tax authorities expect invoices numbered in an unbroken sequence. Here is how to set up sequential invoice numbers in WooCommerce with OrderBay, including prefixes, date tokens and a yearly reset.
Why the order number is not enough
WooCommerce shares one ID counter with posts, products and other records, so order numbers jump. Order 1041 can be followed by 1047. That is fine for tracking orders. For invoices, many countries expect a sequence with no gaps that you can explain. OrderBay keeps a separate invoice counter and only uses a number when an invoice is actually issued.
How OrderBay assigns a number
An order gets its invoice number the first time its invoice is printed or downloaded. The number is then stored on the order and never regenerated, so reprinting an old invoice shows the same number. Draft orders and orders you never invoice do not use up numbers.
Set the format
Open OrderBay › Documents and find Invoice, proforma & credit note numbers. You can set a prefix, the next number, a format and a reset period. The format is built from these tokens:
| Token | Becomes |
|---|---|
{PREFIX} | Your prefix, such as INV- |
{YYYY} / {YY} | The year, as 2026 or 26 |
{MM} / {DD} | Month and day |
{SEQ} | The running number |
{SEQ:5} | The running number padded to 5 digits, such as 00042 |
Some examples:
{PREFIX}{SEQ}gives INV-42. This is the default.{PREFIX}{YYYY}-{SEQ:4}gives INV-2026-0042.{YY}{MM}-{SEQ:3}gives 2610-042.
Every format must contain a sequence token. If you leave it out, OrderBay adds one, so two invoices can never end up with the same number.
Restart the count each year or month
Set the reset period to Yearly or Monthly and the counter goes back to 1 at the start of each period. Pair a yearly reset with {YYYY} in the format, otherwise January’s INV-1 will look the same as last January’s.
Credit notes and proformas
In OrderBay Pro, credit notes and proformas have their own prefix (by default CN- and PRO-), their own counter and their own format, so they never use up invoice numbers. For a refunded order, use the order action OrderBay: issue credit note number, then print the credit note from the order screen.
Changing the format later
You can change the prefix or format at any time. Invoices that already have numbers keep them, and only new invoices use the new format. Changing format part way through a year can leave a visible jump in the sequence. That is expected, but note when and why in case your accountant asks.
Free or Pro
Sequential invoice numbers, prefixes, format tokens and yearly or monthly reset are in the free part of OrderBay, and they keep working after the Pro trial ends. Credit notes, proformas, packing slips and bulk printing need OrderBay Pro. OrderBay Lite, a separate free plugin, also includes sequential invoices and credit notes; it is waiting on its WordPress.org listing.
See OrderBay · OrderBay setup docs · OrderBay vs PDF Invoices & Packing Slips