TaxPro GSP - eInvoiceAPI
User Guide
 
 
×
Menu
Index

Example Code

 
 eInvoiceSession eInvSession = new eInvoiceSession();
 
eInvoiceAPI is the public static class which consist all API methods of eInvoice
 
Function call for Get Auth Token
 
    private async void btnAuthToken_Click(object sender, EventArgs e)
        {
            TxnRespWithObj<eInvoiceSession> txnRespWithObj = await eInvoiceAPI.GetAuthTokenAsync(eInvSession);
            if (txnRespWithObj.IsSuccess)
            {
                 // TODO: place code here that you want to exicute after successful call of Get Auth Token API ex.you can store AuthToken And its expiry time
            }
            txtResponceHdr.Text = "Auth Api Responce";
            rtbResponce.Text = txnRespWithObj.TxnOutcome;
        }
 
Function call for eInvoice Generation
 
     private async void btnGenIRN_Click(object sender, EventArgs e)
        {
            TxnRespWithObj<RespPlGenIRN> txnRespWithObj = await eInvoiceAPI.GenIRNAsync(eInvSession, reqPlGenIRN);
 
}
 
For more integration help please Download TaxProEinvoiceApiIntigrationDemo.NET