Parse the 15-character GSTIN string: the first 2 digits are the state code, the next 10 are the PAN of the business, the 13th is the entity number, the 14th is always 'Z', and the 15th is a check digit — validate this structure before making a network call
Send a GET request to the GST public search API endpoint (https://services.gst.gov.in/services/api/search/taxpayerDetails?gstin={gstin}) to retrieve registered taxpayer details
Check the response fields 'sts' (status) for 'Active' and 'rgdt' (registration date) to confirm the GSTIN is currently valid
Log the returned 'lgnm' (legal name), 'tradeName', 'ctb' (constitution of business), and 'stj' (state jurisdiction) fields for your vendor record
Re-validate periodically (e.g., monthly) as GSTINs can be cancelled or suspended; do not rely on a one-time check at onboarding
Known gotchas
The GST public search API has rate limits and may require a captcha token for automated queries; production integrations often need to go through an authorized GST Suvidha Provider (GSP) for reliable programmatic access
A GSTIN status of 'Provisional' or 'Suspended' means the taxpayer cannot legally charge GST and the buyer cannot claim input tax credit on purchases from them
The GSTIN check digit uses a specific Luhn-variant algorithm; implement the checksum validation locally to catch typos before making a network call
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp