Verify GSTIN
curl --request POST \
--url https://sandbox.cashfree.com/verification/gstin \
--header 'Content-Type: application/json' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--data '
{
"GSTIN": "29AAICP2912R1ZR",
"business_name": "UJJIVAN SMALL FINANCE BANK"
}
'import requests
url = "https://sandbox.cashfree.com/verification/gstin"
payload = {
"GSTIN": "29AAICP2912R1ZR",
"business_name": "UJJIVAN SMALL FINANCE BANK"
}
headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({GSTIN: '29AAICP2912R1ZR', business_name: 'UJJIVAN SMALL FINANCE BANK'})
};
fetch('https://sandbox.cashfree.com/verification/gstin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.cashfree.com/verification/gstin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'GSTIN' => '29AAICP2912R1ZR',
'business_name' => 'UJJIVAN SMALL FINANCE BANK'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.cashfree.com/verification/gstin"
payload := strings.NewReader("{\n \"GSTIN\": \"29AAICP2912R1ZR\",\n \"business_name\": \"UJJIVAN SMALL FINANCE BANK\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.cashfree.com/verification/gstin")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"GSTIN\": \"29AAICP2912R1ZR\",\n \"business_name\": \"UJJIVAN SMALL FINANCE BANK\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/verification/gstin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"GSTIN\": \"29AAICP2912R1ZR\",\n \"business_name\": \"UJJIVAN SMALL FINANCE BANK\"\n}"
response = http.request(request)
puts response.read_body{
"reference_id": 19,
"GSTIN": "29AAICP2912R1ZR",
"legal_name_of_business": "UJJIVAN SMALL FINANCE BANK LIMITED",
"trade_name_of_business": "UJJIVAN SMALL FINANCE BANK",
"center_jurisdiction": "I-A RANGE",
"state_jurisdiction": "GUWAHATI - A - 1",
"date_of_registration": "2017-09-30",
"constitution_of_business": "Public Limited Company",
"taxpayer_type": "Regular",
"gst_in_status": "Active",
"last_update_date": "2022-03-01",
"nature_of_business_activities": [
"Retail Business",
"Supplier of Services",
"Recipient of Goods or Services",
"Office / Sale Office",
"Others"
],
"principal_place_address": "First Floor 3512-DISPUR Prithivi Mansion opp. KFC building G.S. Road, Lachit Nagar Assam 781007",
"principal_place_split_address": {
"building_name": "Prithivi Mansion",
"street": "G.S. Road",
"location": "Lachit Nagar",
"building_number": "3512-DISPUR",
"district": "Guwahati",
"state": "Assam",
"city": "Dispur",
"flat_number": "First Floor",
"latitude": "26.1445",
"longitude": "91.7362",
"pincode": "781007"
},
"additional_address_array": [
{
"address": "Mirza Santipur NH-37 Dist-Kamrup Rural PS-Palashbari, PO Mirza Kamrup Assam 781125",
"split_address": {
"building_name": "",
"street": "NH-37",
"location": "Santipur, Mirza",
"building_number": "",
"district": "Kamrup Rural",
"state": "Assam",
"city": "Palashbari",
"flat_number": "",
"latitude": "26.0926",
"longitude": "91.5069",
"pincode": "781125"
}
},
{
"address": "N.A.C.C.I. Foundation 3559-Tezpur CHAMBER BHAWAN Binjraj Road, P. o. and P.S. - Tezpur, Dist. Binjraj Road, P. o. and P.S. - Tezpur, Dist. Sonitpur Assam 784154",
"split_address": {
"building_name": "CHAMBER BHAWAN",
"street": "Binjraj Road",
"location": "Tezpur",
"building_number": "3559-Tezpur",
"district": "Sonitpur",
"state": "Assam",
"city": "Tezpur",
"flat_number": "",
"latitude": "26.6338",
"longitude": "92.8006",
"pincode": "784154"
}
}
],
"valid": true,
"message": "GSTIN Exists"
}Verify GSTIN
Use this API to verify if a given GSTIN information exists or not. View the test data and use the information to trigger the validations. The test data are usable only in the test environments such as sandbox.
POST
/
gstin
Verify GSTIN
curl --request POST \
--url https://sandbox.cashfree.com/verification/gstin \
--header 'Content-Type: application/json' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--data '
{
"GSTIN": "29AAICP2912R1ZR",
"business_name": "UJJIVAN SMALL FINANCE BANK"
}
'import requests
url = "https://sandbox.cashfree.com/verification/gstin"
payload = {
"GSTIN": "29AAICP2912R1ZR",
"business_name": "UJJIVAN SMALL FINANCE BANK"
}
headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({GSTIN: '29AAICP2912R1ZR', business_name: 'UJJIVAN SMALL FINANCE BANK'})
};
fetch('https://sandbox.cashfree.com/verification/gstin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.cashfree.com/verification/gstin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'GSTIN' => '29AAICP2912R1ZR',
'business_name' => 'UJJIVAN SMALL FINANCE BANK'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.cashfree.com/verification/gstin"
payload := strings.NewReader("{\n \"GSTIN\": \"29AAICP2912R1ZR\",\n \"business_name\": \"UJJIVAN SMALL FINANCE BANK\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.cashfree.com/verification/gstin")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"GSTIN\": \"29AAICP2912R1ZR\",\n \"business_name\": \"UJJIVAN SMALL FINANCE BANK\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/verification/gstin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"GSTIN\": \"29AAICP2912R1ZR\",\n \"business_name\": \"UJJIVAN SMALL FINANCE BANK\"\n}"
response = http.request(request)
puts response.read_body{
"reference_id": 19,
"GSTIN": "29AAICP2912R1ZR",
"legal_name_of_business": "UJJIVAN SMALL FINANCE BANK LIMITED",
"trade_name_of_business": "UJJIVAN SMALL FINANCE BANK",
"center_jurisdiction": "I-A RANGE",
"state_jurisdiction": "GUWAHATI - A - 1",
"date_of_registration": "2017-09-30",
"constitution_of_business": "Public Limited Company",
"taxpayer_type": "Regular",
"gst_in_status": "Active",
"last_update_date": "2022-03-01",
"nature_of_business_activities": [
"Retail Business",
"Supplier of Services",
"Recipient of Goods or Services",
"Office / Sale Office",
"Others"
],
"principal_place_address": "First Floor 3512-DISPUR Prithivi Mansion opp. KFC building G.S. Road, Lachit Nagar Assam 781007",
"principal_place_split_address": {
"building_name": "Prithivi Mansion",
"street": "G.S. Road",
"location": "Lachit Nagar",
"building_number": "3512-DISPUR",
"district": "Guwahati",
"state": "Assam",
"city": "Dispur",
"flat_number": "First Floor",
"latitude": "26.1445",
"longitude": "91.7362",
"pincode": "781007"
},
"additional_address_array": [
{
"address": "Mirza Santipur NH-37 Dist-Kamrup Rural PS-Palashbari, PO Mirza Kamrup Assam 781125",
"split_address": {
"building_name": "",
"street": "NH-37",
"location": "Santipur, Mirza",
"building_number": "",
"district": "Kamrup Rural",
"state": "Assam",
"city": "Palashbari",
"flat_number": "",
"latitude": "26.0926",
"longitude": "91.5069",
"pincode": "781125"
}
},
{
"address": "N.A.C.C.I. Foundation 3559-Tezpur CHAMBER BHAWAN Binjraj Road, P. o. and P.S. - Tezpur, Dist. Binjraj Road, P. o. and P.S. - Tezpur, Dist. Sonitpur Assam 784154",
"split_address": {
"building_name": "CHAMBER BHAWAN",
"street": "Binjraj Road",
"location": "Tezpur",
"building_number": "3559-Tezpur",
"district": "Sonitpur",
"state": "Assam",
"city": "Tezpur",
"flat_number": "",
"latitude": "26.6338",
"longitude": "92.8006",
"pincode": "784154"
}
}
],
"valid": true,
"message": "GSTIN Exists"
}Authorizations
Client ID. You can find your ID in the Merchant Dashboard.
Client secret key. You can find your secret key in the Merchant Dashboard.
Body
application/json
Find the request parameters to retrieve GSTIN information
Response
Success response for retrieving GSTIN information
