WFYI logo

Understanding e-Invoice JSON: Format, Usage, Validation, and System Updates

This article explains the role of JSON files in India's GST e-invoicing system, detailing their format, purpose, and validation processes. It covers recent regulatory updates on e-invoicing applicability and turnover thresholds for businesses. The content also outlines various methods for extracting invoices into JSON format and the available approaches for interacting with the Invoice Registration Portal (IRP).

📖 3 min read read🏷️ e-Invoicing JSON

Taxpayers under GST frequently encounter JSON files and associated errors during GST return filing. The e-invoicing framework will increase the prevalence of JSON file usage. It is important to distinguish between general invoice JSON and e-invoice specific JSON, as they are not identical. Recently, there have been several important updates regarding e-invoicing implementation.

Recent Regulatory Updates

May 10th, 2023

CBIC announced the sixth phase of e-invoicing, mandating that taxpayers with an annual turnover exceeding INR 5 Crore in any financial year since 2017-18 must issue e-invoices starting August 1st, 2023.

May 6th, 2023

The GST Network postponed the implementation of the seven-day time limit for reporting older e-invoices on IRP portals by three months. A new effective date is yet to be announced by the department.

April 13th, 2023

GSTN issued an advisory on April 12th and 13th, 2023, requiring taxpayers with an annual turnover of Rs. 100 crore or more to report tax invoices and credit-debit notes to the IRP within seven days of their issuance, effective May 1st, 2023.

August 1st, 2022

The e-Invoicing system for B2B transactions was expanded to include businesses with an annual aggregate turnover between Rs. 10 crore and Rs. 20 crore, effective October 1st, 2022, as per notification no. 17/2022.

What is a JSON File?

JSON, a JAVA-based computer file, represents an open-standard format utilizing human-readable text for data transmission. It organizes data objects using attribute-value pairs and array data types, making it easy to read and write. This format is commonly employed for transferring structured data between servers and web applications, serving as an alternative to XML.

e-Invoice JSON Data Elements

Below are the structured data elements for e-invoice JSON:

Sr. NoSectionContents
1HeaderIncludes Tax Scheme, Version, Invoice Reference No., etc.
2TransactionDetails Transaction Category and Type
3DocumentSpecifies Document Type, Number, Date, etc.
4SellerContains Seller GSTIN, Trade Name, Address, etc.
5BuyerIncludes Buyer GSTIN, Trade Name, Address, etc.
6DispatchDetails Dispatch GSTIN, Trade Name, Address, etc.
7Ship ToContains Ship to GSTIN, Trade Name, Address, etc.
8ItemProvides Details of Line Items
9DocumentSummarizes all Total Values of the Document
10PaymentIncludes Payment Details and Conditions
11ReferenceContains References Related to the Invoice

JSON Validation and Error Reporting

JSON validations are primarily encountered in these key areas:

1. IRN GenerationOnly specific document types are eligible for IRN generation: Invoice, Debit note, and Credit note.
2. Transaction Categoriese-Invoice requests are limited to the following transaction categories: Business-to-Business (B2B) invoices, Business-to-Government (B2G) invoices, Business-to-Export invoices, Reverse Charge invoices, and Supplies through an e-commerce operator.
3. Reverse ChargeReverse Charge is permitted exclusively for B2B invoices.
4. IRN/e-invoice RequestRequests for IRN or e-invoice can only be made by the supplier or an e-commerce operator on behalf of the supplier. Duplicate IRN requests are rejected. IRN can be regenerated for cancelled e-invoices. An IRN is generated based on a combination of supplier GSTIN, financial year, document type, and document number.
5. Item QuantityThe maximum number of items initially restricted to 1,000, has since been increased to 10,000.

Application of JSON Files under GST

JSON files are utilized under GST for submitting invoice data to various government platforms to ensure GST compliance. This includes processes such as filing GST returns and generating e-way bills. Its most recent application involves the generation of e-invoices.

Purpose and Advantages of JSON Files

JSON's straightforward syntax makes it highly effective for data sharing, regardless of size, by organizing data in arrays to facilitate quicker and easier data transfer. Consequently, JSON files are used for uploading invoice data for GSTR-1 filing and e-way bill generation. Within the e-invoicing framework, sellers are required to upload their JSON invoice data to the IRP. The IRP then returns a digitally signed JSON file to the seller.

Extracting Invoices into JSON Format and Available Methods

Taxpayers must create a standard invoice using their accounting software, including all details mandated by the e-invoice schema (e.g., billing name and address, supplier's GSTIN, transaction value, tax amount). After invoice creation, the taxpayer needs to report it to the IRP by uploading it in JSON file format. Let's explore the various options for invoice extraction and the methods available for uploading invoice data to the IRP. Ultimately, a JSON file will be submitted to the IRP through any of these options.

Invoice Extraction Methods:

  • In situations where third-party applications (ASP)/GSP are utilized, invoices can be downloaded in Excel format (.csv or .xlsx). These applications will then convert the data into JSON files for upload to the IRP.
  • Alternatively, an API integration can be implemented to directly extract JSON data of invoices from the billing or ERP system.

Approaches to Interact with IRP:

  • Utilizing Third-Party Applications (ASP): These applications offer the benefit of managing bulk JSON uploads on behalf of users. This option is particularly suitable for taxpayers with an aggregate turnover ranging between Rs. 5 crore and Rs. 500 crore, ensuring JSON validation.
  • Utilizing an ASP that also serves as a GSP: Choosing this route provides advantages in terms of scalability and archiving capabilities. The government has released APIs to GSPs and to taxpayers with an aggregate turnover exceeding Rs. 500 crore. Taxpayers using a GSP interface will receive an API username and password. GSPs will validate the data against the JSON Schema and business rules before submission to the IRP.
  • Direct Interaction with IRP via API: This option is currently available for taxpayers with an aggregate turnover above Rs. 500 crore. Taxpayers using direct APIs are provided with a Client ID, ClientSecret, API username, and password. While online converters/tools can be used to transform an invoice into JSON, this method is time-consuming as it typically requires uploading one invoice at a time.

Illustrative JSON Format

The government has issued two e-invoice formats: one containing only mandatory fields and another with both mandatory and optional fields. Below is a template showcasing only the mandatory fields. E-invoicing involves two types of JSON: Request JSON and Response JSON. A taxpayer transmits their details to the IRP via Request JSON, and in return, the IRP provides validation errors, status, and other information through Response JSON. A sample invoice JSON format is provided here:

{
“TaxSch”:”GST”,
“Version”:”1.0”,
“Irn”:””,
"TranDtls": {
"Catg": "B2B",
"RegRev": "RG",
"Typ": "REG",
"EcmTrnSel": false,
"EcmTrn": "N",
"EcmGstin": null
},
"DocDtls": {
"Typ": "INV",
"No": "sadsd",
"Dt": "2019-11-25",
"OrgInvNo": null
},
"ExpDtls": {
"ExpCat": null,
"WthPay": null,
"ShipBNo": null,
"ShipBDt": "2019-11-25",
"Port": null,
"InvForCur": 0,
"ForCur": "BDT",
"CntCode": "BD"
},
"SellerDtls": {
"Gstin": "37BZNPM9430M1kl",
"TrdNm": "TAN TEST NIC",
"Bno": "TEST2",
"Bnm": "TEST1",
"Flno": "3RD FLOOR",
"Loc": "GANDHINAGAR",
"Dst": null,
"Pin": 518001,
"Stcd": 37,
"Ph": null,
"Em": null
},
"BuyerDtls": {
"Gstin": "37BZNPM9430M1kl",
"TrdNm": "TAN TEST NIC",
"Bno": "TEST2",
"Bnm": "TEST1",
"Flno": "3RD FLOOR",
"Loc": "GANDHINAGAR",
"Dst": null,
"Pin": 518001,
"Stcd": 37,
"Ph": null,
"Em": null
},
"DispDtls": {
"Gstin": "37BZNPM9430M1kl",
"TrdNm": "TAN TEST NIC",
"Bno": "TEST2",
"Bnm": "TEST1",
"Flno": "3RD FLOOR",
"Loc": "GANDHINAGAR",
"Dst": null,
"Pin": 518001,
"Stcd": 37,
"Ph": null,
"Em": null
},
"ShipDtls": {
"Gstin": "37BZNPM9430M1kl",
"TrdNm": "TAN TEST NIC",
"Bno": "TEST2",
"Bnm": "TEST1",
"Flno": "3RD FLOOR",
"Loc": "GANDHINAGAR",
"Dst": null,
"Pin": 518001,
"Stcd": 37,
"Ph": null,
"Em": null
},
"ValDtls": {
"AssVal": 100.00,
"CgstVal": 1.50,
"SgstVal": 1.50,
"IgstVal": 0.00,
"CesVal": 15.00,
"StCesVal": 36.00,
"CesNonAdVal": 0.00,
"Disc": 0, "OthChrg": 0,
"TotInvVal": 154.00,
},
"RefDtls": {
"InvRmk": null,
"InvStDt": "2019
-11
-25",
"InvEndDt": "2019
-11
-25",
"PrecInvNo": null,
"PrecInvDt": "2019
-11
-25",
"RecAdvRef": null,
"TendRef": null,
"ContrRef": null,
"ExtRef": null,
"ProjRef": null,
"PORef": null
},
"PayDtls": {
"Nam": null,
"Mode": null,
"FinInsBr": null,
"PayTerm": null,
"PayInstr": null,
"CrTrn": null,
"DirDr": null,
"CrDay": null,
"BalAmt": null,
"PayDueDt": null,
"AcctDet": null
},
"ItemsList":”Item” [{
"PrdNm": "dfasf",
"PrdDesc": "dfdfsdf",
"HsnCd": "10",
“BarCde”:””,

Further Reading

Frequently Asked Questions

What is the primary function of an e-invoice under GST?
An e-invoice standardizes the electronic exchange of invoice data between businesses and the Invoice Registration Portal (IRP), simplifying compliance and reducing data entry errors.
Who is currently required to generate e-invoices under GST in India?
As of recent updates, businesses with an annual aggregate turnover exceeding INR 5 crore in any financial year from 2017-18 onwards are mandated to generate e-invoices.
Can an e-invoice be cancelled or amended after generation?
An e-invoice can typically be cancelled within a specified time frame (e.g., 24 hours) from its generation on the IRP. Amendments, however, are usually made by issuing a debit or credit note, which then requires reporting to the IRP.
What is an Invoice Reference Number (IRN) in e-invoicing?
The IRN is a unique identification number generated by the IRP for every e-invoice, confirming its registration and authenticity. It is crucial for tracking and validating e-invoices.
How does e-invoicing benefit GST taxpayers?
E-invoicing streamlines the invoicing process, reduces manual errors, facilitates faster input tax credit (ITC) claims, improves compliance, and enhances data reconciliation between buyers and sellers.