The e-invoicing system is accessible to taxpayers via APIs-Application Programming Interface. The E-Invoice APIs are used to interact and exchange the data between Taxpayer/GSP systems and the e-Invoice system. The data that is exchanged is always encrypted and the RESTful APIs are exposed over the SSL (Secure Sockets Layer).
The e-invoicing system is accessible to the taxpayers via APIs which provide the mechanism of sending and receiving data from the taxpayer. While taxpayers above ₹ 500 CR can directly connect to the Invoice Registration Portal (IRP) via e-invoice APIs (subject to complying with the technical pre-requisites), all other taxpayers can connect via GSPs(GST Suvidha Providers) or ERPs.
E-Invoice API Access Mechanism
Companies with turnover Rs. 500 Cr and above
This category of taxpayers can connect to the GST E-Invoice system via 3 methods:
-
- Direct API Access: They need to whitelist their public IPs. In addition to username and password to each GSTIN (Tax Payer) of the company, the company gets the Client Id and Client Secret to get the access to APIs.
- Through GSPs: The GSTIN (Tax Payer) generates his own username and password and ties up with GSPs to get the access to API using the Client Id and Client Secret of the GSPs. In this case, the taxpayer needs to register the GSP for e-invoicing on the GSTN portal before starting the process.
- Through ERPs: The GSTIN (Tax Payer) generates his own username and password and ties up with ERPs to get the access to API using the Client Id and Client Secret of the ERPs.
Companies with turnover below Rs 500 Cr
This category of taxpayers can connect to the E-Invoice system via 4 methods:
-
- Through ‘Companies having direct access to APIs’: If the tax payer has tie up or using the ERP of the ‘Company which has direct access to API, then he/she can use the API through that company. The GSTIN (Tax Payer) generates his own username and password and gets the access to API using the Client Id and Client Secret of the Company, which has access.
- Taxpayers having access to E-Way Bill APIs:Â If the tax payer has direct access to E-Way Bill APIs, then he/she can use the same Client Id, Client Secret, username and password to get the access to e-Invoice system.
- Through GSPs: The GSTIN (Tax Payer) generates his own username and password and ties up with GSPs to get the access to API using the Client Id and Client Secret of the GSPs. In this case, the taxpayer needs to register the GSP for e-invoicing on the GSTN portal before starting the process.
- Through ERPs: The GSTIN (Tax Payer) generates his own username and password and ties up with ERPs to get the access to API using the Client Id and Client Secret of the ERPs.
E-Invoice API Specification
Taxpayers need to send invoice details to the IRP based on the notified list of data fields for e-invoicing need. The e-invoicing fields are specified in
- e-invoice API draft
- GST INV-01 as per CGST Notification
- E-invoice standard after public consultation
From technical perspective, the data is be uploaded as per the e-invoice API specifications of IRP system. There have been several releases of the E-Invoice Specification which are covered individually below. However, for easy execution, all the current E-invoice APIs are summarised in the image below:
E-Invoice API Specification Version 1.0
The first E-Invoice API Specifications Ver 1.0 were released in January 2020. The voluntary filing for companies with Rs. 500 Cr+ turnover started from 1st January 2020 followed by the voluntary filing for companies with Rs. 100 CR+ turnover from 1st Feb 2020. The GSTN systems were in place and voluntary testing E-invoicing API specification were made available for select taxpayers and GSPs in the first week of Jan 2020. Following APIs were released on sandbox for testing:
- Authentication – For establishing connection between IRP system and taxpayers via API
- Generate IRN – For generating IRN by registering invoice with IRP
- Cancel IRN – For cancelling a generated IRN
- Get E-invoice details – Fetch data for e-invoice by IRN
- Get GSTIN Details – Select Taxpayer details
As the companies started using the portal with live data, several discrepancies in data fields, validations and fields specifications were noticed and hence a revised API Version 1.1 was released in March 2020.
E-Invoice API Specification Version 1.1
A revised E-invoice API Specification Version 1.1 was released on 6th March 2020 in line with the updated e-Invoice standard fields released early Feb 2020.
Key changes in New E-Invoice API Specification and its impact
- Compared to the earlier E-invoice API version, the new version had considerable changes in terms of data fields and its technical specification. However, all the changes in API resulted in a close alignment of the e-invoice standard released by GSTN, which eventually got notified.
- The new specifications provide for E-way Bill generation which would enable auto-generation of E-way Bill, subject to providing the relevant data. On successful E-way bill generation, the details to be returned along with IRN and QR code
- Additional API for generating EWB using IRN were provided. If E-way bill details are not provided during generating IRN, then this new E-invoice API to be used.
In addition to field level changes, there were some validation rules worth noting, for the impact it could have on the business processes –
Validation Rule | Impact |
The Document Date can be yesterday or today’s date.
|
The maximum time gap between invoice generation and getting IRN can be at most 1 day. Back-dated or IRN for earlier dated invoices will not be allowed |
Document number should not be starting with 0, / and -. Also, alphabets in document number should not have alphabets in lower cases. If so, then request is rejected.
|
Revisit the invoice numbering sequence. GST Invoicing rules, however, do not have any such conditions. |
‘Reverse Charges’ can be set as ‘Y’ in case of B2B invoices only and tax is being paid in a reverse manner as per rule. Even in the case of Reverse Charged invoices, the seller has to generate the IRN. |
Responsibility of Invoice and IRN generation in case of reverse charge transactions for B2B, is with the supplier of such goods and services.
|
In case the supplier is a SEZ unit, then he cannot generate e-Invoice.
|
Only suppliers can initiate IRN generation. Hence if SEZ cannot generate e-invoice, then from purchase side invoices received from SEZ will not have any IRN |
e-invoice(IRN) cannot be re-generated for the cancelled e-invoice(IRN) also |
Revisions to invoice need to managed through Debit or Credit Note. Cancellation of IRN is equivalent to a cancellation of the invoice, which makes the invoice void for any further actions |
IRN cannot be cancelled, if the Valid/Active E-way Bill exists for the same.
|
IRN and E-way Bill are tightly integrated and taxpayers need to accordingly align their systems. |
IRN should not be passed as part of the request; it is generated by the e-Invoice system and sent as response. | IRN will be generated by IRP only. Taxpayers systems, if are generating IRN, should not be sent to IRP |
Separate validation rules for e-way bill generation were also provided.
E-Invoice API Specification Version 1.02
Version 1.02 of E-Invoicing API specification was released on 14th May 2020 on sandbox. The specification mostly had changes related to validation and new e-invoice API to generate EWB by IRN. With the new E-invoice APIs, E-way Bill generation flow was enabled. Thus, while sending invoice details for IRN generation, if transport details are included, E-way Bill Number (EWB) gets generated. The APIs available for the e-way bill are:
- Generate IRN – Wherein transport details can be provided along with invoice details. Based on transport details are provided e-way bill number gets generated
- Generate E-way Bill by using  IRN – From the IRP portal itself, an E-way Bill can be generated by providing the IRN
The following table summarises the working of the E-way Bill generation flow
Data you send | E-invoicing API to be used | Response from IRP | Points to note |
· Invoice details · All transport details |
Generate IRN |
· IRN · EWB with validity |
· Generate EWB by IRN (API) not required |
· Invoice details · Minimum transport details (Transporter ID, Mode of transport, Distance) |
Generate IRN |
· IRN · EWB  (but not active – only Part A is created) |
· Generate EWB by IRN (API) cannot be used as EWB number is generated for the invoice · Update PART B of NIC eWay Bill system to be used for updating vehicle details |
· Invoice details · No transport details |
Generate IRN | · IRN |
· Generate EWB by IRN can be used as · No EWB against the invoice is generated |
· IRN · All transport details |
Generate EWB by IRN
|
· EWB with validity | · Subsequent actions for EWB |
· Invoice details · Minimum transport details |
· Generate EWB by IRN | · EWB  (but not active – only Part A is created) | · Update PART B of NIC eWay Bill system to be used for updating vehicle details |
There is no data field related changes in new e-invoicing API specifications, however, the additional validation rules have been included.
The E-invoicing API specifications are available at e-invoicing Sandbox
IRIS Onyx is an automated, integrated and seamless e-invoicing software!
It is a one-stop e-invoicing software that can integrate with your billing systems seamlessly in multiple ways and generate IRN with zero disruption to your business. Schedule an e-invoicing trial using IRIS Onyx
Wow cuz this is extremely excellent work! Congrats and keep it up.
Thanks for appreaciation.
Hello Team,
Thanks for your clear details of E invoicing.I have one query related to IRN for RCM.
Can you pleas help me to understand, as a buyer and processing RCM Invoices, do i need to generate IRN and QR code for RCM Invoices? Is self Invoice form required to have these two details?
I am not getting any clarity on this RCM part. Can you please help me on this.
Regards,
Raghu Bhat
Einvoicing is only required to be done by supplier, Buyer is not supposed to generate E-Invoice. HENCE IN CASE OF RCM WHERE YOU ARE BUYER YOU ARE NOT EXPECTED TO GENERATE IRN AND QR CODE
Hope that clarifies:)
I have been examinating out many of your stories and i can claim pretty nice stuff. I will definitely bookmark your blog.