Summary
An electronic invoice is a legally accepted digital tax receipt document that your organization registers at Invoice Registration Portal (IRP). By using Microsoft Dynamics AX to generate electronic invoices, you help make sure that the electronic invoices that your organization generates are secure, confidential, authentic, and legally acceptable. You can also make sure that required standards are applied to your electronic invoices.
You can generate an electronic invoice for the following documents:
-
Customer invoice
-
Free text invoice
-
Project invoice
-
and their Credit notes
More information
Prerequisites for using electronic invoices
To use electronic invoices in your organization, you must complete the following tasks as prerequisite:
-
Obtain credentials for accessing sandbox and/or production e-Invoice System environment according to instruction at e-Invoice System Portal - https://einv-apisandbox.nic.in/apicredentials.html.
Note: You will need your GSTIN, Username, Password, Client ID and the Client secret.
-
Download archive with public certificate from https://einv-apisandbox.nic.in/einvapiclient/EncDesc/GetPublicKey.aspx, using above mentioned credentials for logging in.
-
Install the certificate on the local computer.
Configure a digital certificate for communication with IRP
Complete the below steps to extract certificate and import it for the local computer:
1. Double-click the downloaded certificate file having '.cer' extension.
2. In the opened window click "Install Certificate…":
3. In the next window select "Local Machine" and click Next:
4. In the next window select the option "Place all certificates in the following store" and click Browse:
Select "Personal" folder and click OK: Then click Next. 5. In the next window click Finish:
6. Installation is complete:
Information that is included in electronic invoices
An electronic invoice includes the following details:
-
The name, address, contact information and GSTIN numbers of the organization (seller) and a customer (buyer)
-
The invoice number, the date, and the document type
-
Details of goods and services for each item sold:
-
-
Serial number of the item
-
Indication whether it is a service supply
-
SAC \ HSN code
-
Quantity, unit of measure and unit price
-
GST rate
-
Applied charges or discounts
-
Totals for invoice line
-
-
The document total details containing itemization of invoice totals
Configuring system to use electronic invoicing
Please complete the below procedures to set up the system to use electronic invoicing for India.
Set up unit of measure
You need to repeat that for all units of measure that you use in electronic invoices to match allowed external codes.
-
Go to Organization administration > Setup > Units > Units.
-
Select one of units, eg. "ea" unit and click External codes.
-
Enter Code (eg. EInv_IN) and External code definition
Note: Code will be used across all units of measure to identify master data set of units of measure codes accepted by electronic invoicing. -
Select your created electronic invoicing unit external code (eg."Einv_IN") and enter the Value (eg. "NOS") in the bottom grid of the form
Set up electronic invoice parameters
Go to Accounts receivable > Setup > eInvoices > Electronic invoices parameters (India), fill in the following parameters:
Parameter |
Parameter description |
GSTIN |
Your Goods and Services Taxpayer Identification Number, used for IRP integration. |
User name |
Your user name provided by NIC, used for IRP integration |
User password |
Your user password provided by NIC, used for IRP integration |
Client Id |
Your Client Id provided by NIC, used for IRP integration |
Client secret |
Your Client secret provided by NIC, used for IRP integration |
Certificate |
Your Certificate provided by NIC, used for IRP integration |
Authorization URL path |
Electronic invoice authorization URL path |
Registration URL path |
Electronic invoice registration URL path |
Cancel URL path |
Electronic invoice cancellation URL path |
Unit code |
Eternal code type for converting units of measure. Created earlier |
Validate before posting |
You can enable additional validation against all mandatory information to be included in the electronic invoice at the invoice posting time. |
Set up HSN codes and products
The below procedures illustrate only the process of setting up a HSN code and assigning it to the product.
Define HSN code
-
Go to General ledger > Setup > Tax > India > HSN codes.
-
Create a record.
-
In the Chapter field, enter a value.
-
In the Heading field, enter a value.
-
In the Subheading field, enter a value.
-
In the Country/region extension field, enter a value.
-
In the Statistical suffix field, enter a value.
-
Save the record, and verify that the HSN code field is updated.
-
In the Description field, enter a value.
-
Select Close.
Assign HSN codes to products
-
Go to Product information management > Products > Released products.
-
Select a product, and then select Edit.
-
On the General FastTab, if the product type is Item, select a value in the HSN code field.
Set up tax registration numbers
Details how to setup GSTIN master data can be found in https://learn.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/ind-set-up-tax-registration-numbers. The below procedure illustrates only simplified process of setting up registration numbers for use in electronic invoicing.
-
Go to General ledger > Setup > Enterprise tax registration numbers
-
Crate a new record
-
Select Tax type = GST and Registration number type = Company
-
Enter the Registration number and save the data
-
Crate a new record
-
Select Tax type = GST and Registration number type = Customer
-
Enter the Registration number and save the data
Set up your legal entity
1. Go to Organization administration > Setup > Organization > Legal entities
2. Expand the Addresses tab and use button Add to create new or Edit already existing primary address
3. Enter or update ZIP, Street, City, District, State and County
Note: Please note that States should have State codes assigned in Organization administration > Setup > Addresses > Address setup > State/province tab.
4. In Edit addresses form expand Tax information fast tab
5. Use Add to set Name or description (eg. “GST”) and select previously created Company registration number in GSTIN/GDI/UID field
6. Close the Tax information and Address form
7. Expand Contact information fast tab in Legal entities form to add Primary phone and Primary email
Set up your customers
Open the customer master from Accounts receivable > Common > Customers > All customers to enter or edit information required for electronic invoicing.
Set up tax information
1. Expand the Addresses tab for a selected customer account and use button Add to create new or Edit already existing primary address
2. Enter or update ZIP, Street, City, District, State and County
Note: Please note that States should have State codes assigned in Organization administration > Setup > Addresses > Address setup > State/province tab.
3. In Edit addresses form expand Tax information fast tab
4. Use Add to set Name or description (eg. “GST”) and select previously created customer registration number in GSTIN/GDI/UID field
5. Close the Tax information and Address form
Set up contact information
-
Use Contacts button to either edit existing or create a new customer contact
-
In Sales demographics tab of Customer master, select existing Primary contact
-
Expand Contact information fast tab in Customers form to add Primary phone and Primary email
Enable customer for electronic invoicing
-
Expand Invoice and delivery fast tab in Customers form
-
Check the eInvoice checkbox for a customer
Note: If this option is set to Yes, the system will be marking invoices posted for this customer account as ready for electronic invoice processing.
Working with electronic invoices
When you post an invoice for e-invoice enabled customer from a sales order, Free text invoice or Project invoice proposal, the electronic invoice will be created. You get information in notification center that Electronic invoice [……..] has been created.
The central place to work all electronic invoices is Accounts receivable > Periodic > eInvoices > Electronic invoices (India). Review Details tab to see all the information which will be populated at different stages of electronic invoice processing.
Field |
Description |
Sent data |
Data sent to the service in JSON format |
Acknowledgement number |
Indian electronic invoice transaction number |
Acknowledgement date and time |
Date and time on which invoice is registered |
Signed QR code |
Signed QR code of the invoice received from IRP |
Signed invoice |
Signed invoice text received from IRP |
Error message |
The text of the error received from IRP |
Created by |
User ID that created an electronic invoice |
Created date and time |
Date and time when invoice was created |
Sent by |
User ID that sent an electronic invoice |
Sent date and time |
Date and time when invoice was sent |
Cancelled by |
User ID that cancelled an electronic invoice |
Cancelled date and time |
Date and time when invoice was cancelled |
Source invoice opens an invoice journal for the invoice used as base for electronic invoice. Upon electronic invoice registration, among other information you get the IRN and QR code that can be printed in Tax invoice and Debit\Credit reports available in the Sales or Project invoice journals:
Register electronic invoice
You must have at least one electronic invoice with status Created or Sending error to register invoices at IRP.
-
Go to Accounts receivable > Periodic > eInvoices > Electronic invoices (India) and select one or multiple invoices to be sent for registration at IRP
-
Click Send button
-
You can use Send electronic invoices form and query to change selection criteria for invoices to send.
Note: You can use Batch tab to define recurrence and register posted invoices without user interaction.
Cancel electronic invoice
You may cancel invoice previously registered at IRP. You must have at least one electronic invoice with status Sent or Canceling error to cancel invoices at IRP.
-
Go to Accounts receivable > Periodic > eInvoices > Electronic invoices (India) and select one or multiple invoices to be cancelled at IRP
-
Click Cancel button
-
You can use Send electronic invoices form and query to change selection criteria for invoices to send.
Note: You can use Batch tab to define recurrence and register posted invoices without user interaction.
Adding a field to JSON electronic invoice
This topic is addressed to users customizing the JSON electronic invoice to include additional information, in necessary. It is provided only as guidance and illustration for a person possessing required skills to customize the product using X++.
-
Identify the contract which corresponds to the JSON part you are going to modify. Einvoice contract classes have the following name pattern Einvoice*Contract_IN. For example:
-
-
EInvoiceSupplierInformationContract_IN (with 2 descendants for customer and project invoices: EInvoiceSupplierInfoCustInvContract_IN and EInvoiceSupplierInfoProjInvContract_IN)
-
EInvoiceBuyerInformationContract_IN with 2 descendants for customer and project invoices: EInvoiceBuyerInfoCustInvoiceContract_IN and EInvoiceBuyerInfoProjInvoiceContract_IN)
-
-
Add a method to the parent abstract class which will return the needed data. In case data is extracted differently for customer and project invoices, override this method in each descendant and provide the necessary implementation. Otherwise, method can be added to the abstract parent class only.
-
Identify the class responsible for JSON generation. Such classes have the following name pattern "Einvoice*Details_IN" and implement ITaxEngineJsonSerializable interface. For example:
-
-
EInvoiceSellerDetails_IN
-
EInvoiceBuyerDetails_IN
-
-
Add a variable to the class declaration corresponding to the parameter you are going to add to the JSON file.
-
Add a parm- method for this variable.
-
Modify getJsonAttributes method correspondingly by adding the newly created parm- method to the end of the list returned by the getJsonAttributes method. Also, in the getJsonAttributes you will have to add the attribute name - just the same as should be written in JSON file.
-
In the EInvoiceCreateOutputFile_IN class locate the method responsible for creating a JSON part which you are changing. For example:
-
-
insertSeller
-
insertBuyer
-
-
Add a line to this method in order to add new data to the JSON. For example
_sellerDetails.parmGSTIN(supplierInformationContract.getGSTIN());
This line will get the GSTIN number from the contract and will pass it to the "Details" class.
If your parameter cannot be empty, use the following pattern for additional validation:
if (!_sellerDetails.parmGSTIN(supplierInformationContract.getGSTIN()))
{
ret = checkFailed(strFmt("@SYS136411", "@SYP4887805"));
}
Note: Compile the project with your changes and restart all the AOSes before testing these changes.
Frequently asked questions
Q: Can I specify additional criteria to be considered when selecting invoices for electronic processing, either to register or cancel invoice?
You can review and modify queries used for invoice after using Send or Cancel function in Accounts receivable > Periodic > eInvoices > Electronic invoices (India). Button Select opens system query form to setup additional or modify existing query criteria.
Q: Where can I find detailed information what went wrong for an invoice which was not successfully registered?
You can review received error code end message in Accounts receivable > Periodic > eInvoices > Electronic invoices (India).
Q: What is not is cope of electronic invoice solution for India?
-
Digital signature by seller
-
Generation of IRN
-
ISD Invoice
-
AP e-Invoice import
Q: What are the supported formats of electronic invoice for India?
The export of electronic invoice can be done in JSON format that containing all required fields defined in technical specification. If there is another format or you need to add extra information to the electronic invoice message, it is to be done as customization. Please refer to Adding a field to JSON electronic invoice section of this article, for more details how to extend the supported JSON format.
Q: What are the supported integrations for Indian electronic invoice registration?
The supported out of the box integration is to IRP directly. Any other integration, for example with any GSP of your choice, is to be custom built by your ISV or implementation partner.
Note: Integration through GSP is not supported by Microsoft natively.