ClearTax provides state-of-the-art APIs (Application Programming Interface) to sync data from diverse ERP Systems to ClearTax E-Invoicing Portal.
These RESTful APIs give you the ability to upload your documents to ClearTax E-Invoicing Portal with real-time validation check. With this API, you will be able to upload Invoices, Credit Notes and Debit Notes from your ERP in JSON format.
A typical API integration involves the following steps:
Trigger - The trigger to call upload API can be initiated by one of the following ways:
On the event of saving a document.
On the event of clicking a “Generate” button within the ERP.
On a scheduled basis via internal or external scheduler.
Action - On successful trigger -
Extraction - Documents will be extracted from relevant finance and logistics modules of the ERP. For SAP customers,ClearTax can provide Z-Development to extract the data.
Upload - Data will be synced to ClearTax E-Invoicing Portal by consuming the APIs exposed by ClearTax. For SAP customers, ClearTax can provide PI/PO or RFC and web solution. The uploaded data and will be validated on ClearTax Portal. All the validation related errors will be sent back to the ERP.
IRN Generation - Data from the ClearTax E-Invoicing Portal will be automatically sent to IRP for generation of IRN. On successful generation, IRN will be sent back to ERP along with signed Invoice and signed QR Code.
Since API integration involves significant time and cost, some customers prefer the SFTP approach.
A typical SFTP integration involves the following steps:
Extraction - Documents will be extracted from relevant finance and logistics modules of the ERP and dumped in SFTP Server of the customer in ClearTax mapped format on a regular basis.
Upload - Files will be uploaded to ClearTax Application either by consuming the APIs exposed by ClearTax or by subscribing to ClearTax FTP Magnet. The uploaded files will be processed and documents will be validated on ClearTax Portal. All the validation related errors can be seen on the Import History page of ClearTax portal.
IRN Generation - Data imported into the ClearTax E-Invoicing Portal will be visible to the logged in user and they can manually generate IRN. On successful generation, the user can download the generated IRN in Excel/CSV format.
Yes, you can log in to the ClearTax E-Invoicing portal and create or upload documents.
Ranges between 2 days to 30 days. Depends on the involvement of customer and system integrator.
Yes, you can get IRN, signed invoice, and signed QRcode. These are strings parsed from JSON. Not PDF. You can use Print API to get PDF and save it in your file system.
SAP can store data in text type.
Just like how a document is sent to ClearTax on document save the event, we need to trigger Cancel API on cancel event as well. This will be done only if the customer wants it to be done.
You can use Print API to get PDF and save in your file system.
There is a note available from SAP - 2872365
Yes, error log comes to ERP and it is up to the customer whether to parse and save it in the ERP.
Missed? You can call Print API again and get the document from ClearTax.
No, we can do database to API integration with an application layer.
With Government Compatible APIs only one but with value-added APIs generation can be bulk
Yes, you shouldn't be able to generate EINV for same INV number again
The Invoice Reference Number (IRN) is a unique number (also known as hash) generated by the e-invoice system using a hash generation algorithm. For every document such as an invoice or debit or credit note to be submitted on the e-invoice system, a unique 64 characters Invoice Reference Number (IRN) shall be generated which is based on the computation of hash of GSTIN of supplier of the document (invoice or credit note, etc.), Year, Document type and Document number (like the invoice number). This shall be unique to each invoice and hence be the unique identifier for each invoice for the entire financial year in the entire GST System for a taxpayer.
The digitally signed invoice is one that has been digitally or electronically signed by the IRP after receiving the invoice upload from the supplier. That is, the government is authenticating the genuineness of the invoice submitted/registered by the taxpayer.
The digitally signed QR code of the invoice is one that has been digitally or electronically signed by the IRP after receiving the invoice upload from the supplier. That is, the government is authenticating the genuineness of the invoice, by preparing the important information of the invoice in QR Code form and signing it so that the invoice can be verified offline by anyone using offline tools.
The QR code will consist of the following e-invoice parameters:
GSTIN of Supplier
GSTIN of Recipient
Invoice number as given by Supplier
Date of the generation of invoice
Invoice value (taxable value and gross tax)
The number of line items.
HSN Code of the main item (the line item having the highest taxable value)
Unique Invoice Reference Number (hash)
The signed QR code contains the unique IRN (hash) along with some important parameters of invoice and digital signature so that it can be verified by an Offline App. This will be helpful for tax officers checking the invoice on the roadside where the internet may not be available all the time.
ClearTax will get the 'Signed QR Code' from IRP and provide it as part of the response to the request made by the taxpayer for the IRN generation.
Content of the signed QR code can be easily verified by the taxpayers or Tax Officials to ascertain whether the invoice is registered with the IRP and is digitally signed by the IRP itself. By validating the content of the QR code data with the digitally signed content (which is part of the QR code itself) one can check the authenticity of the content. If the content of the QR code has tampered, the e-Invoice will become invalid and signature verification fails. The Signed QR Code can be verified by anyone using the offline app provided on the IRP portal.
Yes, the seller must place the QR Code on the top right corner of the invoice. This will enable its validation. The QR code sent by the IRP will not be an image but rather a JWT (JSON Web Token) string, which the accounting/billing software or the ERP will read and convert into QR Code.
The size of the printed signed QR code can be 2 X 2 inches. However, it depends on the size of the space available on the invoice. But it should be readable from the QR code scanners.
When it is printed it will look like as follows:
The signed QR Code is in the form of JWT. It has three parts – signature parameters, data and signature. These parts are separated by DOT in between as shown below.
"SignedQRCode": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjExNUY0NDI2NjE3QTc5MzhCRTFCQTA2REJFRTkxQTQyNzU4NEVEQUIiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJFVjlFSm1GNmVUaS1HNkJ0dnVrYVFuV0U3YXMifQ
.eyJkYXRhIjoie1wiU2VsbGVyR3N0aW5cIjpcIjM3QlpOUE05NDMwTTFLTFwiLFwiQnV5ZXJHc3RpblwiOlwiMDNCWk5QTTk0MzBNMUtMXCIsXCJEb2NOb1wiOlwiQ1RETjIzNDU2XCIsXCJEb2NUeXBcIjpcIklOVlwiLFwiRG9jRHRcIjpcIjA1LzA4LzIwMjBcIixcIlRvdEludlZhbFwiOjE2NjUwLFwiSXRlbUNudFwiOjEsXCJNYWluSHNuQ29kZVwiOlwiMzkyMzEwMTBcIixcIklyblwiOlwiYWZkY2MzMmEwZWFhM2EwNTRjZmZjZDI1MTg4NGQzZTNmNGY3MjZiNzVjODk0M2U3ZDM1ZmJhYmM4MmYwNWQ4YVwifSIsImlzcyI6Ik5JQyJ9
.Wb0zhfPKW2dRY4ocTbDnD4Bspz4cZoQ9To_HmWxA2xmVdVBK_57H-9AWwTNvjFyFwMx0PWV_4CQjcajxTUjsA9DxOe4r6XCi86XEuXmXDt49gCNY3dZTeoZyueyYAOsRoOZ4ETtDuqvHQGDVsc7Lyaj9qMbyn0NnSH_KwUUrK6Qt8tmcqocv0CvCKZEN5NmeICseCEh0ndJSOmK2kb41sQgAjhNq9-xRz8f7oOrWaC6yf9DMPhYWVcux0E9JLABoNtX3Qb326dd0J1BOMUbhIrAt9QdamaMmHKgO1h-3974d7uUBzz4e6jrclUjZX2XGvH2oXgBwmvgMHwW62Q"
On decoding Signed QR Code parameter, it looks like as follows:
{
"alg": "RS256",
"kid": "115F4426617A7938BE1BA06DBEE91A427584EDAB",
"typ": "JWT",
"x5t": "EV9EJmF6eTi-G6BtvukaQnWE7as"
}
{
"data": "{\"SellerGstin\":\"37BZNPM9430M1KL\",\"BuyerGstin\":\"03BZNPM9430M1KL\",\"DocNo\":\"CTDN23456\",\"DocTyp\":\"INV\",\"DocDt\":\"05/08/2020\",\"TotInvVal\":16650,\"ItemCnt\":1,\"MainHsnCode\":\"39231010\",\"Irn\":\"afdcc32a0eaa3a054cffcd251884d3e3f4f726b75c8943e7d35fbabc82f05d8a\"}",
"iss": "NIC"
}
.[Signature]
One can verify the signature with this data by using the related DS Certificate from
the portal. The above Signed QR Code can be verified using the Public Key as given below.
"PublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArxd93uLDs8HTPqcSPpxZrf0Dc29r3iPp0a8filjAyeX4RAH6lWm9qFt26CcE8ESYtmo1sVtswvs7VH4Bjg/FDlRpd+MnAlXuxChij8/vjyAwE71ucMrmZhxM8rOSfPML8fniZ8trr3I4R2o4xWh6no/xTUtZ02/yUEXbphw3DEuefzHEQnEF+quGji9pvGnPO6Krmnri9H4WPY0ysPQQQd82bUZCk9XdhSZcW/am8wBulYokITRMVHlbRXqu1pOFmQMO5oSpyZU3pXbsx+OxIOc4EDX0WMa9aH4+snt18WAXVGwF2B4fmBk7AtmkFzrTmbpmyVqA3KO2IjzMZPw0hQIDAQAB"
No, in addition to the important information of the invoice, the JWT also includes the digital signature by the IRP. That is, the government is authenticating the genuineness of the invoice, by signing it so that it can be verified offline by anyone using offline tools or on the central portal. This will be helpful for tax officers checking the invoice on the roadside where the internet may not be available all the time. If the QR Code is decoded, the signature will be lost thereby making it unverifiable and defeating the purpose. Therefore the QR Code must be printed with the JWT in the payload without any decoding.