TaxPro GST Lib
User guide (Under Construction)
 
×
Menu
Index
Search GST TaxPayer API
 
API Method: GET
 
URL For Production: https://gstapi.charteredinfo.com/commonapi/v1.1/search
URL For Sandbox: https://gstsandbox.charteredinfo.com/commonapi/v1.1/search
 
Headers Parameters
Property
Description
Data Type
aspid
AspUserId provided by GSP.
String
asp-secret
Encrypt AspPassword (Asp Secret Key) provided by GSP for pass through API access, Encrypted using AspEK (received in GetKey API)
Sample:
request.AddHeader("asp-secret", AesEncryptBase64(“Asp Secret Key”,AspEK))  [Algorithm: AES/ECB/PKCS7]
String
session-id
SessionID.  ASP may create multiple Sessions.
string
txn
Unique Transaction ID even if calling GSP Service API. (Requires only once, which you are already passing as requirement for GST API.)
string
appver
Application Name and Version calling API. (Optional but Recommended)
string
Content-Type
application/json; charset=utf-8
string
ip-usr
123.123.123.123
string
 
Query Parameters
Property
Description
Data Type
action
"TP" - set to value TP for Search TaxPayer Action.
String
gstin
GSTIN of API Caller (under which API would be Loged).
String
searchgstin
GSTIN of TaxPayer to Search for.
String
 
Sample for URL Based API:
https://gstapi.charteredinfo.com/commonapi/v1.1/search?Action=TP&Gstin=CallerGstin&SearchGstin=GSTINOfTaxPayerToSearch
Header Parameter:
request.AddHeader("asp-secret", AesEncryptBase64(“Asp Secret Key”,AspEK))  [Algorithm: AES/ECB/PKCS7]
request.AddHeader("session-id", “session_id Received in GetKey API Response”);
request.AddHeader("aspid", "ASPID");
request.AddHeader("txn", "Unique Transaction ID");
request.AddHeader("Content-Type", "application/json; charset=utf-8");
 
Response to the Search GST TaxPayer API Call will be as below
Search TaxPayer
Details
Respective Key (Item)
Response Sample
Registration Date
rgdt:
01/07/2017
Company Type
ctb:
Private Limited Company/ Limited Company..
Constitution of Business
sts:
Active/ Inactive
Legal Name
lgnm:
ABC Corporation LTD.
State Jurisdiction
stj:
Jalandhar
GSTIN
gstin:
11AAAAA2222Q1Z2
Nature of Business Activity
nba:
Recipient of Goods or Services/Wholesale Business
 
Method in TaxProGST.API Lib:
public async static Task<TxnRespWithObj<SearchTaxpayerJson>> SearchTaxPayerAsync(APISession ApiSession, string SearchGSTIN)
 
public async static Task<TxnRespWithObj<SearchTaxpayerJson>> SearchTaxPayerAsync(string ASPID, string ASPPassword, string GSTIN, string SearchGSTIN)
 
Note: If you are using "SearchTaxPayer" User Control and setting "DatabaseContext" Property, it will catch TaxPayer's Info in table "GSTINInfoCache".
 
//================================================
//AES Encrypt Payload - Payload  (Sample C# Code) 
//================================================
public static string AesEncryptBase64(string payLoad, string key)
        {
            using(AesManaged AesM = new AesManaged())
            {
                AesM.Key = Convert.FromBase64String(key);   
                AesM.Mode = CipherMode.ECB;
                AesM.Padding = PaddingMode.PKCS7;
                byte[] bytPayload = Convert.FromBase64String(payLoad);
                ICryptoTransform crypt = AesM.CreateEncryptor();
                return Convert.ToBase64String(crypt.TransformFinalBlock(bytPayload, 0, bytPayload.Length));
            }
        }