Starmatic Technologies Official Logo
Starmatic
Invoicing & Customization

Financial Year Sequential Invoice Numbering

Configure compliant invoice sequences that automatically reset on April 1 using atomic PostgreSQL database locking.

Updated: September 20264 min read

Statutory Financial Year Reset Rule

Rule 46(b) of the CGST Rules mandates that tax invoices must contain:

> "A consecutive serial number not exceeding sixteen characters, in one or multiple series, containing alphabets or numerals or special characters, unique for a financial year."

In India, the financial year runs from April 1 to March 31 (e.g., FY 2026–27). On April 1 at 00:00:00 IST, invoice counters must reset to start from 1 (or your configured starting number) for the new financial year.

Invoice Numbering Format & Placeholders

SuperGST constructs sequential invoice numbers using dynamic placeholders configured in tenant settings:

  • [PREFIX]: Custom prefix string (e.g., INV, SGST, or store initials).
  • [YEAR]: Current 2-digit Financial Year (e.g., 26-27 for FY 2026–27).
  • [SEQUENCE]: Auto-incrementing counter padded with leading zeros (e.g., 0001, 0042).

Default Standard Format:

[PREFIX][YEAR]-[SEQUENCE] $\rightarrow$ produces INV26-27-0001

Rule 46(b) 16-Character Safety Check:

Every generated invoice number is validated against the statutory regex ^[A-Za-z0-9/-]{1,16}$. If a prefix or format results in more than 16 characters, generation is rejected to ensure strict legal compliance.

Credit Note Numbering:

Credit notes maintain their own independent, isolated counter and prefix (default CN-, producing e.g. CN-0001 or CN-26-27-0001).

Transactional Concurrency & Collision Prevention

During festive flash sales or sudden traffic surges, dozens of orders can arrive within milliseconds. SuperGST executes counter increments using enterprise-grade database serialization and isolated row transactions:

  • 1
    Safely initializes and validates the active financial year counter sequence.
  • 2
    Acquires an isolated transactional lock on the store's sequence record.
  • 3
    Consecutively increments the sequence number and immediately commits the transaction.

This guarantees strictly consecutive, gap-free invoice numbering with zero race conditions or duplicate invoice collisions.

Have questions about this specification?

Contact Starmatic's engineering team for custom integration support.

Get in touch