Skip to content
VALIDURE
All posts

Getting a GST tax invoice right the first time, with worked examples and checks

By Validure team · · 16 min read

A technical guide to the GST tax invoice. Rule 46 particulars, numbering, HSN digits, place of supply with CGST+SGST versus IGST examples, rounding, credit notes, e-invoicing thresholds and SQL checks to run before an invoice is saved.

Getting a GST tax invoice right the first time, with worked examples and checks

Say a 12-person trading company in Pune sends an invoice for 40 cartons to a customer in Nashik. Three weeks later the customer's accountant writes back. The invoice charges IGST, but both parties are in Maharashtra, so the customer can't take the credit cleanly. Someone in the office fixes it the quick way: opens the file, changes IGST to CGST and SGST, and sends it again with the same number. Now there are two versions of one invoice, and only one of them matches what was filed.

None of this is hard tax law. It's a handful of rules that are easy to forget at 6 pm on the last day of the month. This post goes through them in the order they bite, and ends with SQL checks you can run before an invoice is saved.

A caution: rules get amended, and some figures below were cross-checked against professional commentary rather than the gazette. Where a number matters, confirm it on the official sites at the end or with your accountant. The sums are examples with round numbers.

What the invoice has to contain

Rule 46 of the CGST Rules sets out the particulars of a tax invoice, and section 31 of the CGST Act says when one has to be issued. Guides count the particulars differently (16 or 17 are quoted), so here is a working list grouped by purpose. Check the exact wording in the current rule text.

Group What goes on the invoice
Who is selling Name, address and GSTIN of the supplier
Which document A consecutive serial number, not more than 16 characters, and the date of issue
Who is buying Name, address and GSTIN if the buyer is registered. For an unregistered buyer, name, address and state become mandatory once the taxable value reaches 50,000 (verify the current threshold wording)
What is sold HSN code for goods or SAC for services, description, quantity and unit for goods
How the money works Total value, discount, taxable value, rate and amount of CGST, SGST or IGST, and cess if any
Where it's supplied Place of supply with the state name and code for inter-state supplies, and the delivery address where it differs
Special flags Whether tax is payable on reverse charge, and the signature or digital signature of the supplier

Rule 46 is "subject to rule 54", which covers special cases, so read that too if you're in one. Each row of the table is also something a program can test for presence.

Invoice numbers: the three rules people break

The serial number has to be consecutive, no longer than 16 characters, and unique within the financial year. Guides describe the permitted characters as letters, numerals, a hyphen and a slash. That's it. No spaces, no brackets, no underscores.

The length limit catches people because everyone likes a descriptive prefix.

Invoice number Characters Valid?
INV/26-27/00412 15 Yes
PUNE-B2B/26-27/412 18 No, too long
INV 26-27 412 13 No, spaces
VALIDURE/2026-27/000412 23 No, too long

Put the financial year in the number. It makes uniqueness hold even if your counter restarts on 1 April. Sources differ on whether a restart is required (the rule asks for a unique number within the year, not a reset), so choose one approach and write it down.

Use a separate series per branch or document type, with a counter only the system increments. A gap with a note ("cancelled, printed in error") is fine. A gap nobody can explain is what an officer asks about. The two usual failures are the same number issued twice from copies of one sheet, and a number reused after a deletion. A unique constraint on supplier, year and number stops both.

HSN and SAC: how many digits

The number of digits on the invoice depends on your aggregate turnover, under Notification 78/2020-Central Tax, effective 1 April 2021.

Aggregate turnover (previous financial year) HSN or SAC digits on the invoice
Up to 5 crore 4 digits on B2B supplies. Supplies to unregistered buyers are excluded from the requirement
Above 5 crore 6 digits on all taxable supplies

The turnover that counts is the previous financial year's, so your requirement can change on 1 April. The GSTR-1 HSN table follows a similar split (reporting rules changed in stages, so check the current advisory). You can always print more digits than the minimum.

The code matters more than the digit count, because the rate hangs off it. A wrong code means the wrong tax and a mismatch in your customer's records. Keep the item master as the single source of item, code and rate, and don't let anyone type a code into an invoice line.

Place of supply decides the tax head

This is the mistake in our opening story. The rule of thumb everyone learns is "same state, CGST plus SGST; different state, IGST." That's right, but the state that counts is the place of supply, not where the buyer's head office sits, and not where the truck went.

For goods that move, section 10 of the IGST Act generally treats the place of supply as where the movement ends. Where the buyer directs delivery to a third party (bill-to ship-to), the buyer's location generally drives the tax. For services between parties in India, section 12 generally uses the recipient's location if they're registered. The specific rules for services such as transport, events or real estate differ, so don't assume the default for those.

Here are two worked examples. Take 40 cartons at 1,250 each, taxable value 50,000, rate 18 per cent (an example rate, take the real one from the item master). The supplier is in Pune, Maharashtra, state code 27.

Intra-state: buyer in Nashik (27) Inter-state: buyer in Bengaluru (29)
Taxable value 50,000.00 50,000.00
CGST 9% 4,500.00
SGST 9% 4,500.00
IGST 18% 9,000.00
Invoice total 59,000.00 59,000.00

The customer pays the same either way. The wrong head isn't cosmetic: the tax lands in the wrong ledger on both sides.

A bill-to ship-to case: the Pune supplier bills the Bengaluru company (29) but ships to that company's customer in Hyderabad (36). Under section 10(1)(b) the place of supply is generally Bengaluru, so it's IGST. A rule that looks only at the delivery address gets this wrong. Have a tax professional confirm edge cases.

One cheap check helps: the first two digits of a GSTIN are the state code. If a buyer's GSTIN begins with 29 and the invoice says place of supply 27, one of the two is wrong, unless it's a bill-to ship-to case or a special service rule applies.

Printed invoices, a calculator and a phone on a desk, with one line being highlighted (AI-generated illustration)

Rounding: why line totals and invoice totals disagree

Tax can be calculated on each line and added up, or calculated once on the invoice total. The two can differ by a few paise, and with many lines, by more.

An example. An invoice has three lines of 10.25 each at 5 per cent, split 2.5 per cent CGST and 2.5 per cent SGST.

Method CGST SGST Total tax
Per line, each head rounded to paise: 10.25 x 2.5% = 0.25625, rounds to 0.26, three lines 0.78 0.78 1.56
On the invoice total: 30.75 x 2.5% = 0.76875, rounds to 0.77 0.77 0.77 1.54

Same invoice, a 2 paise gap. Over long invoices and a month of them, it becomes a reconciliation headache.

Section 170 of the CGST Act covers rounding to the nearest rupee, and commentators disagree on whether it applies per line, per head or only to amounts payable. GSTR-1 accepts two decimals, per published guidance. The practical rule is simpler:

  1. Choose one method, line level or invoice level, and use it in every document, including credit notes.
  2. Round each tax head once, at the point you chose, and store the result. Never recompute it later from the rate.
  3. If you round the grand total to a whole rupee, show the difference as a separate round-off line, outside the tax amounts. Here 30.75 + 1.54 = 32.29, round-off minus 0.29, payable 32.00.

I prefer line level, because the printed lines then add up to the printed total, but it depends on your customers. Either way, invoice, return and books must be built from the same stored numbers.

Fix mistakes with credit and debit notes

Once an invoice is issued and reported, it doesn't get edited. Section 34 of the CGST Act provides for credit notes (the value or tax was too high, goods returned, discount) and debit notes (the value or tax was too low). Rule 53 sets out what they must contain, including a reference to the original invoice.

Example. Of the 40 cartons on invoice INV/26-27/00412, 5 come back damaged. The credit note covers 5 x 1,250 = 6,250 taxable. At 9 per cent each, CGST is 562.50 and SGST is 562.50, so the credit note total is 7,375.00. A debit note works the same way in the other direction: if the price was actually 2 higher per carton, 40 x 2 = 80 taxable, 18 per cent is 14.40, and the debit note is 94.40.

Two points that catch people.

  • Time limit. A credit note that reduces your output tax has to be declared by 30 November following the end of the financial year of the original supply, or the date you file the annual return for that year, whichever is earlier. For a supply in 2026-27, that's 30 November 2027 at the latest.
  • The buyer's side. Since 1 October 2025 (verify this against the CBIC text and its notification), the proviso to section 34(2) has meant a supplier generally can't reduce output tax for a registered buyer unless that buyer has reversed the related input tax credit. A credit note is therefore a document your customer has to act on too. Tell them.

The opening story should have ended with a credit note for the wrongly taxed invoice and a new invoice with a new number and the right heads. Both then appear in your returns.

When the invoice has to be issued

Section 31 and rule 47 link the issue date to the supply. For goods that move, the invoice is due at or before removal. For services, the rule gives 30 days from the date of supply. Other periods apply to some financial businesses and continuous supplies, and rule 47A sets 30 days for the self-invoice on certain reverse-charge purchases. Check the rule for your case.

Example: a consulting job is completed on 5 November, so the invoice is due by 5 December. Issue it on 8 December and you're outside the period, even if the client doesn't mind. In a system that's a date check. The invoice date also decides the return period, and a back-dated invoice after filing is how people end up amending GSTR-1.

E-invoicing: who needs it

E-invoicing means the invoice data is sent to the government's Invoice Registration Portal (IRP) before it's issued, and it comes back with an Invoice Reference Number (IRN) and a QR code. The usual summary, from vendor and professional sources, is:

  • It applies to registered businesses whose aggregate turnover exceeded 5 crore in any financial year from 2017-18 onwards. The 5 crore level has been in force since 1 August 2023 (Notification 10/2023-Central Tax).
  • It's mainly a B2B and export mechanism.
  • A separate rule, reported as applying from 1 April 2025 to businesses at 10 crore and above, stops IRN generation for documents older than 30 days. This is easy to confuse with the 5 crore test, and they are different tests.
  • Some categories are exempt, and there's talk of lowering the limit. I found no official notification doing so, so check the e-invoice portal for your own status.

The IRN is created from your data, so every mistake above gets locked in the moment you submit. Validate first, then submit.

Validation checks to run before an invoice is saved

Take your invoice register as a sheet, one row per invoice, with the seller's state, buyer's GSTIN (blank if unregistered), place of supply, financial year, series, number, invoice date, supply date, taxable value, CGST, SGST, IGST, round-off and total. Add a second sheet for lines, with HSN, rate and the same tax columns. Every check below should come back empty, whether you run it on a draft before saving or across the month's register at month end.

Check What to look for What a hit means
Number format An invoice number longer than 16 characters, or with anything other than letters, digits, hyphen or slash The number is not valid
Gaps in a series Sort by series and number within the year, and look for a step above 1 A missing invoice. Each gap needs a reason on file
Tax head vs place of supply Seller's state equals place of supply but IGST is above zero, or the states differ and CGST or SGST is above zero Wrong tax head
Buyer GSTIN state The first two digits of the buyer's GSTIN differ from the place-of-supply state A review item, not always an error: bill-to ship-to and special services. Warn, don't block
HSN digits Fewer than 4 digits on B2B invoices (turnover up to 5 crore), or fewer than 6 on every invoice (above 5 crore) HSN too short for your band
Line tax CGST + SGST + IGST differs from taxable value x rate / 100 by more than 0.01 Wrong tax on the line
Header vs lines Line totals for taxable value or any tax head differ from the header, or taxable + taxes + round-off differs from the total The invoice doesn't add up
Late invoice Invoice date more than 30 days after the supply date (services; change the period per supply type) Issued outside the period

The most useful control isn't a check at all: make duplicate numbers impossible, so the register refuses a second invoice with the same number for the same GSTIN and year. The line tax check allows one paisa of drift because of the rounding section, and the HSN check needs a turnover flag you update each April.

If you have a developer, this is the query for the tax head check, the one where a mistake costs the most.

SELECT id FROM invoices
WHERE  (seller_state =  pos_state AND igst > 0)
   OR  (seller_state <> pos_state AND (cgst > 0 OR sgst > 0));

Whoever builds your system should run these rules in the application and in the database as well, so imports and spreadsheets can't skip them.

Five things to settle before a GST invoice is saved

Where a system helps, and where it doesn't

The checks only help if the data feeding them has one source. That's what we built Validure ERP around: quotations turn into GST tax invoices with CGST, SGST and IGST, GSTR-1 and GSTR-3B summaries come from the same records, and an audit trail shows who changed what. You still set item codes and rates once, correctly.

You may not need it. One person issuing a few dozen invoices a month from a controlled template can run on a spreadsheet and these checks done by hand at month end. The case grows with the number of people issuing invoices, the states you sell into, and e-invoicing.

If you evaluate any tool, including ours, ask: can I issue a number outside my series? Can an issued invoice be edited, or only corrected by a note? Does the tax head come from the place of supply or a typed field? Can I export everything if I leave?

Sources and checks

Several figures above were cross-checked against professional and vendor commentary, not the gazette, so verify them on the official sources: the CBIC GST pages for the CGST Act, the CGST Rules, notifications and circulars, the GST Council for council decisions, the GST portal for advisories, and the e-invoice portal for e-invoicing applicability and the IRN process. The worked examples use round numbers and example rates. They are illustrations, not tax advice.

Frequently asked questions

How many characters can a GST invoice number have?

Not more than 16, using letters, numerals, a hyphen or a slash, and it must be unique within the financial year. Put the year in the number so that a restarted counter can't repeat an old one.

How many digits of HSN do I need on my invoice?

Under Notification 78/2020-Central Tax, businesses up to 5 crore turnover use 4 digits on B2B invoices, and above 5 crore use 6 digits. The turnover is that of the previous financial year. Confirm against the current notification.

Can I edit an invoice after I've issued it?

No. Issue a credit note (or a debit note for an increase) that refers to the original, and raise a fresh invoice if the whole thing was wrong. Credit notes have a time limit under section 34 and, since October 2025, may depend on the buyer reversing credit, so check the current text.

When do I charge IGST instead of CGST and SGST?

When the place of supply is in a different state from the supplier's location. For goods the place of supply is generally where the movement ends, with a bill-to ship-to exception, and for services it is generally the recipient's location. Special service rules differ.

Does my business need to issue e-invoices?

If your aggregate turnover exceeded 5 crore in any financial year since 2017-18, generally yes for B2B and export invoices, subject to exempt categories. Check your status on the e-invoice portal, since limits and reporting windows have been changing.

Which is better, rounding tax per line or on the invoice total?

Either can be defensible. Pick one, apply it everywhere, store the rounded amounts, and show any rounding of the grand total as a separate line. Consistency matters more than the choice.

More guides

Whether you're launching a new digital product, modernizing an existing platform, or solving a complex business challenge — we'd like to hear where you're headed.

The first conversation is just that — a conversation.