GST Verification with OTP API
The business enters an OTP from the GST portal to consent. We then fetch up to the requested months of returns and return filing history, turnover summary, late filings and top customers.
- Source
- GST returns from the GST portal, accessed with the taxpayer's OTP consent
- Turnaround
- Async: usually a few minutes after OTP, longer for 24 months of data; result by webhook
- Endpoint
- POST /v1/gst/otp/fetch
- Who can use it
- Lenders and B2B businesses with a clear underwriting or credit purpose. The taxpayer must have API access enabled on the GST portal.
Overview
For small-business lending, GST returns are often the best record of real sales, better than a balance sheet prepared for the loan. The taxpayer authorises access with an OTP, and we pull their returns and turn them into a filing history and turnover summary your credit team can use.
Good to know
It shows reported sales, not cash in the bank. Combine with bank statement analysis to spot businesses that report more than they collect.
What you get
- Actual reported turnoverMonthly taxable value from GSTR-1 and GSTR-3B, summarised over the period you choose.
- Filing disciplineLate or missed returns are counted, which is a good early signal of stress.
- Customer concentrationTop buyers by value show if the business depends on one or two customers.
- Proof of controlOnly someone with the GST portal credentials and registered mobile can complete the OTP step.
Request
POST https://api.ampletrails.com/v1/gst/otp/fetch
| Field | Type | Status | Description |
|---|---|---|---|
gstin | string | Required | GSTIN of the business (step 1: request OTP) |
gst_username | string | Required | Taxpayer's GST portal username |
request_id | string | Required | Reference from the OTP step (step 2) |
otp | string | Required | OTP received by the taxpayer on their registered mobile or email |
period_months | number | Optional | Number of past months of returns to fetch |
Response
Fields inside data. Every response also carries status, request_id and, on errors, message. See error codes.
| Field | Meaning | Example |
|---|---|---|
legal_name | Legal name of the business | EXAMPLE TRADERS PRIVATE LIMITED |
filing_history | Return-wise filing status by month | [{"period": "2026-10", "gstr3b": "FILED"}] |
turnover_summary.total_taxable_value | Total taxable outward supplies over the period (₹) | 18250000 |
turnover_summary.monthly_average | Average monthly taxable value (₹) | 1520833 |
top_customers | Largest recipients by value, from GSTR-1 | [{"gstin": "29AABCB1234B1Z3", "share": 0.18}] |
late_filings | Number of returns filed late in the period | 1 |
consent_id | ID of the taxpayer's consent record | cons_9a7e44 |
Example
curl -X POST https://api.ampletrails.com/v1/gst/otp/fetch \
-H "Authorization: Bearer $AMPLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"gstin": "07AAACA1234A1Z5", "gst_username": "example_traders", "request_id": "gstotp_31b9e0", "otp": "123456", "period_months": 12}'import os, requests
resp = requests.post(
"https://api.ampletrails.com/v1/gst/otp/fetch",
headers={"Authorization": f"Bearer {os.environ['AMPLE_API_KEY']}"},
json={
"gstin": "07AAACA1234A1Z5",
"gst_username": "example_traders",
"request_id": "gstotp_31b9e0",
"otp": "123456",
"period_months": 12
},
timeout=30,
)
resp.raise_for_status()
print(resp.json()["data"])const resp = await fetch("https://api.ampletrails.com/v1/gst/otp/fetch", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AMPLE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"gstin": "07AAACA1234A1Z5",
"gst_username": "example_traders",
"request_id": "gstotp_31b9e0",
"otp": "123456",
"period_months": 12
}),
});
const { data } = await resp.json();$ch = curl_init("https://api.ampletrails.com/v1/gst/otp/fetch");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AMPLE_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode(["gstin" => "07AAACA1234A1Z5", "gst_username" => "example_traders", "request_id" => "gstotp_31b9e0", "otp" => "123456", "period_months" => 12]),
]);
$data = json_decode(curl_exec($ch), true)["data"];{
"status": "success",
"request_id": "req_7f3a9c21e4",
"data": {
"legal_name": "EXAMPLE TRADERS PRIVATE LIMITED",
"filing_history": [
{
"period": "2026-10",
"gstr3b": "FILED"
}
],
"turnover_summary": {
"total_taxable_value": 18250000,
"monthly_average": 1520833
},
"top_customers": [
{
"gstin": "29AABCB1234B1Z3",
"share": 0.18
}
],
"late_filings": 1,
"consent_id": "cons_9a7e44"
}
}Example data. The exact field list for your account comes with your sandbox documentation.
Use cases
MSME term loans and credit lines
Underwrite on 12 to 24 months of GST data instead of audited financials.
Supply chain finance
Anchors and lenders check a distributor's sales trend before setting limits.
Invoice discounting
Match invoices offered for funding against the seller's GSTR-1.
Questions about this API
What does the taxpayer need to do first?
Enable API access on the GST portal (under their profile) and know their portal username. Then they enter the OTP we trigger. Many first attempts fail because API access was never switched on.
How many months can I pull?
Usually up to 24 months, depending on what has been filed. Ask for fewer if you only need a recent picture; it's faster.
Is the data available immediately?
No. The portal can be slow, so we fetch in the background and send the result to your webhook, usually within minutes.
Can I re-fetch later without a new OTP?
The consent window on the GST portal is limited. For a later refresh, ask the taxpayer for a new OTP.
Try the GST Verification with OTP API
Sandbox keys, the full field reference and a Postman collection, usually within a working day.