TaxPro GSP - eInvoiceAPI
User Guide
 
 
×
Menu
Index

eInvoice Api Integration Java library

 
You may directly open Java Integration Demo Project using Intellij Idea(You can integrate jar with any IDE). Demo project has UI and backend code to show integration of each available eInvoice library method corresponding to respective API in your application.
 
Before you start using eInvoice Lib. First thing to watch for is EInvoiceSession class.
 
This class includes E_InvoiceAPISetting class & E_InvoiceAPILoginDetails class
 
InvoiceAPISetting – The common settings for all TaxPayers. In case ASP application has multiple TaxPayer support, values in in Settings would remain same.
 
InvoiceAPILoginDetails – TaxPayer specific settings. In case ASP application has multiple TaxPayer support, values of login details changes taxpayer to taxpayer .
 
 
 public class E_InvoiceAPISetting
    {
        public string GSPName;
        public string AspUserId;
        public string AspPassword;
        public string client_id;
        public string client_secret;
        public string AuthUrl;
        public string BaseUrl;
        public string EwbUrl;
    }
    public class E_InvoiceAPILoginDetails
    {
        public string UserName;
        public string Password;
        public string GSTIN;
        public string AppKey;
        public string AuthToken;
        public string Sek;
        public string E_InvoiceTokenExp;
    }
 
 
 
Point To Note
 
EInvoiceSession have default parameterised constructor.
 
public EInvoiceSession eInvoiceSession = new EInvoiceSession(LoadAPISettingsFromConfigFile,LoadAPILoginDetailsFromConfigFile);
 
When you create Instance without parameter like below
 
public EInvoiceSession eInvoiceSession = new EInvoiceSession();
 
 
it will automatically load E_InvoiceAPISetting and E_InvoiceAPILoginDetails from config file that you have to add into your project from demo project.
 
If you wann to load InvoiceAPISetting and InvoiceAPILoginDetails from database then make the parameter's value false  as below.
 
public EInvoiceSession eInvoiceSession = new EInvoiceSession(false,false);