How to get e-invoice API and ip address white listing in e-invoice portal?
How to Get E-Invoice API and IP Address Whitelisting in the E-Invoice Portal (India)
With the Government of India implementing e-invoicing under GST (Goods and Services Tax) for B2B transactions, businesses are now required to generate invoices through government-authorized platforms. For medium and large enterprises that use automated systems like ERPs, API integration with the e-invoice system is essential.
This guide walks you through the complete process of obtaining E-Invoice API access and getting your IP address whitelisted on the e-invoice portal.
๐ What is the E-Invoice API?
The e-invoice API is a set of web-based services provided by the Goods and Services Tax Network (GSTN) that allows taxpayers to integrate their ERP or accounting software with the Invoice Registration Portal (IRP). This enables direct submission and generation of IRNs (Invoice Reference Numbers) and QR codes in real-time without manual data entry.
✅ Prerequisites for API Access and IP Whitelisting
Before you apply for API access, ensure the following:
-
GSTIN is active and under e-invoice mandate (turnover exceeds the current threshold, e.g., ₹5 crores).
-
You are registered on the e-Invoice portal: https://einvoice.gst.gov.in.
-
Your ERP or accounting system supports JSON data and HTTPS protocol for API calls.
-
You have a public IP address for communication with the e-invoice API.
-
You have a valid Class 2 or Class 3 DSC (Digital Signature Certificate) if needed for registration.
๐ Step-by-Step Process to Get E-Invoice API Access
Step 1: Register on the E-Invoice Portal
-
Go to https://einvoice.gst.gov.in.
-
Click on "Registration" and select "Portal Login".
-
Use your GSTIN and credentials to log in.
Step 2: Register as a GSP or Direct API User
There are two types of API access:
-
Direct API Access: For large taxpayers who want to directly integrate their ERP with the IRP.
-
GSP Route: For businesses that prefer to use a GST Suvidha Provider.
To register for Direct API:
-
Log in to the e-invoice portal.
-
Go to API Registration > User Credentials.
-
Select "Direct API".
-
Enter details:
-
PAN
-
Registered email ID
-
Mobile number
-
-
Set a username and password for API access.
Step 3: IP Address Whitelisting
To prevent unauthorized access and enhance security, NIC requires whitelisting of IPs.
-
After Direct API registration, go to API Registration > IP Whitelist.
-
Enter your static public IP address (up to 4 IPs can be added).
-
Submit the form.
⚠️ Note: You must provide a static IP address. Dynamic IPs from ISPs like mobile networks or broadband routers without fixed IPs are not accepted.
Step 4: Wait for Approval
Once submitted:
-
The NIC (National Informatics Centre) team will review your request.
-
If the details are valid, your IPs will be whitelisted typically within 24-72 hours.
-
You will receive confirmation via email or portal dashboard.
๐ Using the API Credentials
Once whitelisted, use the API credentials (username and password) along with your static IP to:
-
Authenticate with the e-invoice system.
-
Generate IRNs via JSON payload.
-
Cancel e-invoices.
-
Fetch details of previously generated invoices.
All API calls must be sent over HTTPS and signed with HMAC SHA-256 using your credentials.
๐ง Testing Environment (Sandbox)
NIC provides a sandbox environment for developers:
-
Register on the E-Invoice Sandbox Portal: https://einv-apisandbox.nic.in
-
Use it to test APIs before going live.
-
Sandbox uses a separate set of credentials and test GSTINs.
๐ ️ Troubleshooting & Common Issues
Issue | Solution |
---|---|
IP Not Whitelisted | Ensure the IP is static and correctly formatted. Check with your ISP. |
Invalid Credentials | Reset your API password from the portal. |
403 Forbidden Errors | Likely due to an unregistered IP or wrong headers. |
IRN Generation Failed | Check the JSON structure; use schema from NIC documentation. |
๐ Resources
-
E-Invoice API Portal: https://einvoice.gst.gov.in
-
Developer Documentation: https://einv-apisandbox.nic.in/apiportal/
-
Official Helpdesk Email: support.einv.api@gov.in (subject to updates)
-
GSTN Helpdesk: 1800-103-4786
๐ Conclusion
Integrating your system with the e-invoice API is essential for businesses that generate high volumes of invoices. Following the steps above for registration, IP whitelisting, and testing will ensure a smooth and secure integration process. Always keep your system updated with the latest APIs and security protocols issued by NIC.
Comments
Post a Comment