← Back to Blog

How to Set Up HSN Codes in Your Item Master and Sales Account

Should the HSN code go in your item master or your sales account? Here is where HSN belongs in billing software, how to set it up step by step, and how to make sure it prints correctly on every GST invoice.

Sep 19, 2026•6 minutes

If you have ever opened your billing or accounting software and wondered whether the HSN code belongs on the product, the stock group or the sales ledger, you are not alone. Searches like "hsn master code" and "sales account hsn code" come from exactly this confusion. Get it wrong and your GST invoices show the wrong code, your GSTR-1 HSN summary does not match your sales, and you spend month-end fixing bills one by one.

This guide explains where HSN codes should live in your billing system, how to set them up once, and how to check they flow through to every invoice.

What the HSN Master Actually Is

The "HSN master" is simply the place in your software where each product is linked to its HSN (Harmonised System of Nomenclature) code and GST rate. Most systems call this the item master or product master. Once an item carries its HSN code, every bill that includes that item picks up the code automatically.

For services, the equivalent is the SAC (Services Accounting Code), which always starts with 99. It is set up the same way, on the service item.

If you do not yet know the right code for a product, look it up first with the HSN Code Finder or follow our guide on how to check HSN code on the GST portal.

Item Master vs Sales Account: Where Should HSN Go?

Many accounting packages let you enter HSN in more than one place. Here is how the options compare:

Where you set HSNBest forRisk
Item / product masterShops selling many products with different codesNone, this is the recommended default
Stock group or categoryGroups where every item shares one HSN and rate (e.g. all notebooks)Wrong code if a different item is later added to the group
Sales account / sales ledgerBusinesses selling only one type of goods, or service income ledgersEvery item billed through that ledger gets the same code

The short answer: put the HSN code on the item master. Use the sales account HSN code only if everything you sell through that ledger genuinely shares one code and one tax rate. A general store that sells soap, rice and plastic buckets through a single "Sales" ledger cannot use a ledger-level HSN, because those items have different codes and different GST rates.

Where software supports several levels, the more specific setting usually wins: an HSN on the item overrides one on the group, which overrides one on the ledger. Check your software's documentation, and avoid setting conflicting codes at different levels.

How to Set Up HSN Codes in Your Item Master

Follow these steps once, and billing takes care of itself afterwards:

  1. Export or list all your products. Start from your current product list, including slow movers you still stock.
  2. Group items by type. Put similar products together (all biscuits, all LED bulbs, all steel utensils). Items in the same group often share a code, which speeds up the work.
  3. Find the correct code for each group. Use the HSN Code Finder or our HSN code list for common retail products.
  4. Enter the HSN code and GST rate on each item. Open the product in your billing software and fill in the HSN field and tax rate together. They must match: the rate is decided by the code.
  5. Use the right number of digits. See the rules below.
  6. Save and create a test bill. Bill one item from each group and check the invoice before going live.

In billing software like Trayvo, the HSN code is stored with the product itself, so once it is saved you do not re-enter it at the counter. That is the main benefit of an item-level HSN master: the cashier only scans or picks the product.

How Many HSN Digits Do You Need?

The number of digits depends on your aggregate annual turnover in the previous financial year:

  • Up to ₹5 crore: at least 4-digit HSN on B2B tax invoices (optional on B2C invoices).
  • Above ₹5 crore: 6-digit HSN on all tax invoices, B2B and B2C.
  • Exports and imports: 8-digit codes are used in customs documents.

If you are unsure, entering the full 6 or 8 digits in your item master is safe. A longer, correct code is never a problem, and it saves rework if your turnover grows.

Check That HSN Prints Correctly on Invoices

After setup, verify these points on a sample invoice:

  • HSN or SAC appears against every line item, not just once at the bottom.
  • The GST rate on each line matches the rate for that code.
  • CGST and SGST (or IGST for inter-state sales) are calculated correctly.
  • The invoice includes the other mandatory fields covered in our guide to GST invoice rules in India.

Then run your HSN-wise sales summary report for the test period. The totals should match your sales register. This summary is what goes into Table 12 of GSTR-1, so a clean item master makes filing much faster.

Common Mistakes to Avoid

  • One code for everything. Setting a single HSN on the sales account when you sell mixed goods.
  • Blank HSN on new items. Staff add a new product quickly and skip the field. Make it a rule that no item is saved without HSN and GST rate.
  • Rate and code mismatch. Changing the GST rate without checking the code, or the other way round.
  • Never reviewing codes. GST rates change after Council meetings. Review your item master whenever rates are revised.

Frequently Asked Questions

What is an HSN master code?

It is the HSN code saved against a product in your billing or accounting software's item master. Once saved, the code is picked up automatically on every invoice and in your HSN-wise GST reports.

Can I set the HSN code on my sales account instead of each item?

Yes, but only if everything billed through that sales account shares the same HSN code and GST rate. For shops selling mixed products, set HSN on each item instead, or you will report wrong codes.

Is HSN mandatory on B2C bills for small shops?

For businesses with turnover up to ₹5 crore, HSN is mandatory on B2B tax invoices and optional on B2C invoices. Adding it anyway keeps your records consistent and your GSTR-1 summary easier to prepare.

Where do I find the correct HSN code for a product?

Use Trayvo's free HSN Code Finder, check the GST portal's HSN search, or ask your supplier, whose purchase invoice usually shows the code for the same product.

What happens if I use the wrong HSN code?

A wrong code can mean charging the wrong GST rate, mismatches in your returns and possible notices or penalties. Correct the item master first, then issue credit or debit notes for affected invoices if the tax amount was wrong.

Ready to solve these problems?

Start using Trayvo today and see the difference in your shop.