SAP ByD Integration with E-Invoicing for India
Challenges/Requirement
As per Indian GST regulations, businesses with an annual turnover exceeding ₹5 crore are required to generate an Invoice Reference Number (IRN) from the GSTN portal before issuing invoices to customers. To facilitate this, various GST Suvidha Providers (GSPs) offer integration between ERP systems and the GSTN portal.
Our goal is to integrate SAP Business ByDesign (ByD) with the IRIS Onyx portal (https://irisgst.com/).
To achieve seamless e-invoicing integration, we developed a solution that automatically submits invoice details to the IRIS portal via a RESTful API.
The integration captures and stores the Invoice Reference Number (IRN), the Signed e-invoice, and the Signed QR Code directly in SAP ByD. Buyers can validate the invoice by scanning the QR code on the invoice printout for quick verification.
Technical Solution
We have developed three configuration screens and one staging screen for the eInvoicing Integration.
- The Authentication screen saves the authentication credentials and tokens for accessing the IRIS. This configuration screen also has a scheduler job to refresh the tokens every 2 hours.
- The GST State Code screen is used to store the first two characters of the State GST Code.
- The Distance Configuration stores the Distance between departure and destination place. It is required to get the E-Way Bill.
- Before the Invoice/Stock Transfer Order is sent to the GSTN, it will pass through the Invoice Details staging screen. It will have the IRN Status, API call request body, response, and Logs. We can monitor the submission process in the staging screen.
Once an Invoice/Stock Transfer Order is processed, an entry is created in the staging screen. Authentication tokens are retrieved from the Auth Config, and the invoice details are sent to GSTN. The success or error response from IRIS is logged, including the request body (JSON) in case of failure for further analysis. Manual triggers are available via Retrigger buttons. Additionally, users can cancel an invoice submission through Cancel Actions.
Seller’s Perspective
When the user/employee requests legal approval, the invoice details will be sent to the Indian GST portal through the Restful API provided by the IRIS and store the returned IRN Number, Signed Invoice, and, Signed QR Code back to the Invoice Document. Once the IRN Number is stored in the Invoice Document, the SAP system will be automatically released.
If the IRN Number is not returned from the API Call, we can find the reason in the Logs of Custom Invoice Documents screen. The Invoice print form will have the Signed QR code for the verification process on the buyer’s end.
Similarly, stock transfer orders need to be submitted to the GSTN Portal. When the stock transfer order reaches the Outbound Delivery, the user will click the “Submit for Legal Approval” action. Just like with the invoice submission process, the response details will be saved in the Outbound Delivery.
If the E-Way Bill details (Truck Number, Distance, Transporter Name, Transportation Date, …Etc) have been maintained in the Invoice, it will also store the E-Way Bill number in the Invoice Document.
Buyer’s Perspective
The buyer/goods receiver can validate the invoice details and integrity by scanning the QR Code in the invoice printout. To do this, the buyer should install the ‘e-Invoice QR Code Verifier’ mobile application released by the Indian GSTN. It will validate the Invoice QR with the Indian GST portal and return a successful validation message with the invoice details.
Business Benefits
With the eInvoice Integration, the invoice details can be submitted to the Indian Government with just one click. Because of the live integration, the details can be found immediately in the Indian GST portal.
At the end of the fiscal year, the taxpayer does not need to manually export the reports such as GSTR9 from ByD and submit it to the Indian Government. Rather this is directly available in IRIS application
The invoice details can be validated through the Android application released by the Indian Government. The buyer/goods receiver can validate it by scanning the QR Code printed on the invoice. This promotes transparency among the Buyers, Sellers, and the Government.