Building Invoice Generation Into Your Online Store: GST Invoice Output, E-Invoice Connections and What to Brief Your Developer On (2026)
If you sell through your own website, the invoice your store produces is part of the product you are building. A customer who needs a business invoice, an accountant who needs clean data, and (for larger sellers) the government's e-invoicing system all depend on how your store captures order data and turns it into a document. The practical answer for most stores is this: your accountant decides whether e-invoicing applies to you and what each invoice must contain, and your developer builds the checkout fields, the invoice template, the numbering, the storage and, if required, the connection to an e-invoicing provider. This guide explains the build side of that split so that you can brief a developer clearly, ask the right questions of an invoicing app, and test before launch.
This article is not tax advice. GST rules, thresholds and deadlines change by notification, and the right treatment depends on your registration, turnover and what you sell. Take every tax decision to your chartered accountant or GST practitioner; the aim here is to help you turn their decisions into a working store. It replaces an earlier version of this page that focused on the rules themselves; for the rules, rely on the official sources listed at the end.
What e-invoicing is, in one paragraph
Under GST, e-invoicing is a system in which certain registered businesses report their business-to-business (B2B) tax invoices to an Invoice Registration Portal (IRP). The portal validates the data and returns an Invoice Reference Number (IRN) and a digitally signed QR code, which must appear on the invoice. According to the GST e-invoice system documentation published by the GST Network, e-invoicing applies to taxpayers whose aggregate turnover crossed a notified threshold in any preceding financial year, and that threshold has been ₹5 crore since 1 August 2023. The GSTN has also advised that taxpayers with aggregate annual turnover of ₹10 crore or more must report invoices to the IRP within 30 days of the invoice date, a limit that began applying from 1 April 2025. Confirm the current position with your accountant, because notifications change, and exemptions apply to some categories of taxpayer.
For most small stores selling mainly to consumers (B2C), this does not apply, but ordinary GST invoices still do. Either way, the website has work to do.
Which part is the accountant's job and which part is the developer's
A clear division prevents most disputes between store owners and developers.
| Decision | Who decides | What the developer builds |
|---|---|---|
| Is e-invoicing applicable to the business? | Accountant | A switch in settings, so the feature can be turned on later |
| Which fields must appear on the invoice? | Accountant | Checkout and admin fields, template layout |
| Tax rate and HSN code for each product | Accountant | Product fields, validation, tax calculation |
| Invoice number series and financial-year reset | Accountant | Sequential numbering that cannot duplicate |
| When the invoice is issued | Accountant, with the owner | Trigger in the order workflow |
| Treatment of cancellations and refunds | Accountant | Credit-note or amendment workflow |
| Which provider reports to the IRP | Owner, with the accountant | API connection, error handling, storage of IRN and QR |
Writing this table into your project brief, with your accountant's answers in the second column, saves weeks.
The data your store must capture
An invoice is only as good as the data behind it. Review each source.
Product data
For every product or variant the store should hold:
- A clear description that matches what the customer bought
- The HSN or SAC code, as confirmed by your accountant
- The applicable tax rate, and whether the displayed price includes tax
- The unit of measure where relevant
Do not let this default to a single rate for the whole store unless that is genuinely correct. Many stores sell products with different rates, and mistakes here repeat on every invoice. Product data preparation is covered in our article on preparing product catalogue data.
Customer and checkout data
Capture, as required by your accountant:
- Buyer name and billing address
- Shipping address, if different
- Place of supply, which depends on the delivery state and drives the split between CGST plus SGST and IGST
- For business buyers, an optional GSTIN field with basic format validation, and ideally a note telling the buyer that the invoice will carry the number they enter
Keep the checkout simple for consumers. Ask for a GSTIN only if the customer ticks "I need a GST invoice". Our guide to checkout forms and guest checkout explains how to add fields without losing orders. Validate the GSTIN format on the page, and where your invoicing provider offers a lookup, verify it on the server; a wrong number printed on an invoice creates work for both sides.
Order data
Each order should store, at the time of purchase and unchanged afterwards:
- Item lines with price, discount, taxable value, tax amount and rate
- Shipping and other charges, with their tax treatment
- Discount treatment, such as whether a coupon reduces the taxable value, as advised by your accountant
- Payment method and status
- Seller details: legal name, address, GSTIN
Store these as a snapshot. If you later change a product's price or tax rate, old invoices must not change.
Building the invoice document
Choose your source of truth
You have three common routes:
- Platform-native documents. Some platforms and themes can generate a basic invoice. Check whether it can carry all the fields your accountant lists. Often it cannot without customisation.
- A plugin or app. On WooCommerce and Shopify there are many invoice apps. Evaluate each on field coverage, numbering control, credit-note support, data export and whether it can connect to an IRP provider. Test on a staging site first and review how it stores data. Our guide to auditing WordPress plugins lists the checks to apply before adding one.
- Your accounting software. Many accounting systems generate invoices and can report to the IRP. In this route your store sends order data to the accounting system, which issues the invoice. The risk is integration failures, so decide what happens when the connection is down.
Whichever you choose, avoid having two systems each issue their own invoice number for the same order. Pick one numbering authority.
Numbering
GST rules require invoice numbers to be unique and within a prescribed length and character set; your accountant will confirm the series format. Build accordingly:
- Generate numbers on the server, in a single place, with a database constraint preventing duplicates.
- Do not reuse numbers of cancelled orders.
- Handle the financial-year reset as your accountant specifies.
- Keep separate series if your accountant tells you to, such as for different GST registrations or document types.
Template and presentation
The template should include whatever fields your accountant lists. Practical points for the developer:
- The layout should work as a PDF that prints cleanly on A4.
- Include the QR code and IRN in the position your provider specifies when e-invoicing applies.
- Use a font that supports the rupee symbol and any regional-language text you need.
- Generate the PDF server-side so that it is identical every time it is downloaded.
- Store the final PDF or the exact data used to produce it, so the document can be reproduced.
Timing and delivery
Decide when each order gets its invoice. Some stores issue it at dispatch, others at order confirmation. The decision belongs with your accountant, and your store should state it ("Your invoice will be emailed when your order ships"). Make the invoice available in the customer's account and by email; the account-area design is covered in our article on building the customer account area. Protect the download link so customers can only reach their own documents.
If e-invoicing applies to you: the integration
When your accountant confirms that e-invoicing applies, the store, or the system behind it, must send eligible invoices to the IRP and store the response. Typically this happens through a GST Suvidha Provider (GSP) or an e-invoicing API provider that handles authentication and communication with the IRP, though businesses with higher volumes may connect differently. The GSTN publishes technical documentation for the e-invoice schema.
From a build perspective, plan for:
- Which invoices are sent. B2B invoices with a buyer GSTIN are the usual case; consumer sales are generally not sent individually. Confirm with your accountant, and build the rule explicitly rather than sending everything.
- The data mapping. Your order fields must map to the schema fields. Missing or malformed values cause rejections. Build validation before sending, such as checking the GSTIN format, state codes and that totals add up to the rupee.
- Storing the response. Save the IRN, acknowledgement number and date, and the signed QR data against the order, and print them on the invoice.
- Error handling. The portal can reject a payload or be temporarily unavailable. The store needs a queue, retries with sensible limits, an alert to a named person, and a screen where a staff member can see failed invoices and fix them. Customers should not receive a document that lacks a required IRN.
- Cancellation. The rules allow cancellation of an IRN only within a limited window, as notified, and require proper amendment documents afterwards. Your accountant should supply the workflow, and the store should make it hard to cancel an order in a way that leaves the invoice records inconsistent.
- The 30-day reporting window, where it applies to you. Build an alert for any invoice that has not been reported after a set number of days, so nothing silently slips past the deadline.
Do not hard-code credentials in the store's code. Keep API keys in secure configuration, restrict access, and rotate them if a team member leaves. Our guides on WordPress admin users and offboarding and HTTP security headers cover related hygiene.
Credit notes, refunds and cancellations
Orders change after the invoice. The store needs a defined path for:
- Full cancellation before dispatch
- Partial refunds or returns, which usually require a credit note linked to the original invoice
- Price or address corrections, which may need an amended document
Your accountant sets the rule for each. The developer should ensure that the original invoice remains stored, that each credit note references it, and that the refund in the payment system matches the document. Build the returns screens with this in mind; our article on the returns experience shows how requests and status updates fit together.
Reporting and reconciliation data
Even if no portal connection is needed, your accountant will want to reconcile orders, invoices and payments. Make this easy by providing:
- An export of invoices for a date range, with all tax columns
- Order-level data that ties each invoice to a payment reference
- A clear flag for B2B and B2C, and for orders with a GSTIN
- A log of changes to invoices and who made them
If you sell on marketplaces too, keep those sales separate in the data, because the documents and reporting responsibilities differ.
Privacy and security of invoice data
Invoices contain names, addresses, phone numbers and tax identifiers. Treat them as personal data under India's Digital Personal Data Protection Act, 2023, and confirm your obligations with an adviser. Practical measures:
- Protect invoice downloads behind login or expiring links
- Do not place invoice files in a public folder with predictable names
- Limit staff access to what they need
- Back up invoice data regularly and test restoring it; see website backups and disaster recovery
- Keep records for as long as the law requires, as advised by your accountant
Test plan before you go live
Run these with your accountant present for the first few:
- A B2C order with a single product, and one with several products at different tax rates.
- A B2B order with a valid GSTIN, and one with an invalid GSTIN to see the error.
- An inter-state and an intra-state order, checking the split between taxes.
- An order with a discount code, checking how the taxable value is shown.
- An order with shipping charges, checking tax treatment.
- A cancellation before dispatch, and a partial return after delivery, with the resulting documents.
- A rapid series of orders to check that numbering stays unique and in sequence.
- A failed provider connection, to see that the retry and alert work.
- A PDF check on screen, in print and on a phone.
- An export of the month's invoices matched against orders and payments.
Keep screenshots and the test results with your project documents.
Questions to ask a developer or an invoicing app vendor
- Which fields does your template support, and can we add more?
- How does numbering work, and can two orders ever get the same number?
- Can the system connect to an e-invoicing provider, and which ones?
- What happens when the provider or the IRP is down?
- How are credit notes produced, and are they linked to the original?
- Where is the invoice data stored, and can we export it?
- How do you protect invoice downloads?
- What is the cost per invoice or per month, and what happens to our data if we leave?
Frequently Asked Questions
Does every online store need to generate e-invoices?
No. E-invoicing applies to registered taxpayers above a notified turnover threshold, which has been ₹5 crore of aggregate turnover since August 2023, and it mainly concerns B2B invoices. All registered sellers still need proper tax invoices. Ask your accountant whether e-invoicing applies to you.
Who is responsible for invoice rules, the developer or the accountant?
Your accountant decides what applies and what each document must contain. Your developer builds the fields, numbering, templates, storage and integrations that carry out those decisions. Give the developer a written brief from your accountant.
Can a WooCommerce or Shopify store connect to the e-invoicing portal?
Usually through an invoicing app, an accounting system or a GST Suvidha Provider that handles the connection. Check which providers integrate with your platform, test on a staging site and confirm how failures are handled.
What should the store do when an e-invoice request fails?
It should keep the order, retry within sensible limits, alert a named person and show staff a list of failed invoices to fix. The customer should not receive a final invoice that is missing a required reference number.
How long should invoice data be kept?
Keep records for the period the law requires, which your accountant can confirm. Make sure backups include invoice data and that you can restore them.
Sources
- GST Network (GSTN) e-invoice system documentation and the GST e-invoice portal, for how the IRP, IRN and QR code work and for the published schema.
- Central Board of Indirect Taxes and Customs (CBIC) notifications on the e-invoicing turnover threshold (₹5 crore from 1 August 2023), and GSTN advisories on the 30-day reporting limit for taxpayers with aggregate annual turnover of ₹10 crore or more (from 1 April 2025). Thresholds and deadlines may have changed since this page was last reviewed; confirm with your accountant.
- The text of the Digital Personal Data Protection Act, 2023, for the privacy section. This article is not legal or tax advice.
- The division-of-responsibility table and the test plan are our own working guidance.
About the author and next step
This guide was written by the ecommerce team at Govindani Infotech, a website design and development company at 2nd Floor, Landmark Plaza, 206 Satara Road, Parvati Paytha, Pune 411009. If you would like your store's invoice output, checkout fields and integrations planned and built, see our checkout system service and website creation service, or contact us on 092019 58274. Scope and pricing are confirmed by the team after understanding your store.