All India workflows
GSTIN extraction from invoices
A GSTIN is 15 characters, and it does a lot of work: two digits for the state, ten characters of PAN, two more for the entity and check, and one final check character. The same document can carry several of them — the supplier’s on an invoice, the customer’s next to it, the consignee’s on an e-way bill — and every one has to be right, because a transposed digit in a supplier GSTIN is an input-credit mismatch nobody wants to trace later. Dynamite Docs extracts every GSTIN on a document as its own confidence-scored field and checks it against the 15-character format before anything is exported.
Try this workflow free or view pricing.
One transposed digit undoes a whole invoice
- A GSTIN mixes letters and digits, and there can be several on one document — supplier, customer, consignee — with none of them easy to tell apart at a glance.
- The format is strict: two state-code digits, ten characters of PAN, then an entity digit and a check character. A scan or a tired set of fingers can swap a “B” for an “8” or a “0” for an “O” without anyone noticing in the moment.
- The cost is downstream. A wrong supplier GSTIN on a purchase invoice means the input credit attached to it doesn’t match when the returns are reconciled, and the mismatch has to be chased back to a keystroke.
- On e-invoices the GSTIN also lives inside a 2D QR code, so the visible field and the coded field have to agree. Extraction has to read the printed value and, where the QR is present, verify it against what the QR says.
How GSTINs get read and checked
01 — Drop the batch in
Upload invoices, e-invoices, e-way bills, or scans from your email and WhatsApp. Digital PDFs parse deterministically; scans and photos are read by the vision model you choose.
02 — Every GSTIN as its own field
Supplier, customer, and consignee numbers are read separately, not lumped into one “GST number” cell, so the role of each is preserved in the row.
03 — Format-validated, confidence-scored
Each GSTIN is checked against the 15-character structure: length, two-digit state code, the PAN pattern in the middle, and the entity digit and check character at the end. Anything that fails the pattern or reads unclearly is flagged for review.
04 — Export and reconcile
Supplier and customer GSTINs export as separate columns in Excel, CSV, or JSON, or as rows in Google Sheets, ready for your ledger and for reconciliation against the returns your CA prepares.
Document types this workflow handles
- GST invoices — supplier and customer GSTIN
- E-invoices — GSTIN in the QR and on the form
- E-way bills — consignee GSTIN alongside transport details
- Credit / debit notes — linked to the original invoice’s GSTIN
What gets extracted from the GSTIN block
Each GSTIN is read as its own role-tagged field and validated against the format:
- GSTIN (supplier) — 27AABCS1429B1ZP
- GSTIN (customer) — 27BAAFG2874Q1ZX
- GSTIN (consignee) — 07AAECU4471L1ZF
- State code (digits 1-2) — 27
- PAN (digits 3-12) — AABCS1429B
- Entity + check (digits 13-15) — 1ZP
- Registered name — Shri Balaji Traders
A realistic example
An e-invoice and its e-way bill extract to rows like these, each GSTIN tagged with its role:
| Role | GSTIN | Registered name | Confidence |
| Supplier | 27AABCS1429B1ZP | Shri Balaji Traders | 0.98 |
| Customer | 27BAAFG2874Q1ZX | Vasavi Office Systems | 0.97 |
| Consignee (e-way bill) | 07AAECU4471L1ZF | UrbanMiles Logistics | 0.99 |
Reading the 15 characters without fumbling
The structure is what makes validation possible. Characters 1-2 are the state code, so a GSTIN from Maharashtra starts with 27 and one from Delhi with 07. Characters 3-12 are the PAN, ten characters in the standard letter-letter-letter-letter-letter-number-number-number-number-letter shape. Character 13 is the entity code and characters 14-15 the check character. Because the shape is fixed, a value that doesn’t fit the pattern — wrong length, letters where digits should be — is caught before it reaches your books, and a GSTIN that fits but was read low-confidence still goes to your review queue.
The positions matter. On a purchase invoice the supplier’s GSTIN usually sits near the letterhead and the customer’s in the billing block, but layouts vary and the two can sit side by side. On an e-way bill a third number, the consignee’s, appears with the transporter details. Reading each one as a separate, role-tagged field stops the supplier’s number from landing in the customer’s column, which is the kind of swap that survives a glance.
E-invoices add a layer: the same GSTIN is encoded in a 2D QR code, and the printed field and the QR should agree. Where the QR is present, extraction cross-checks the visible value against it; where it isn’t, the visible field carries the confidence score and your review. The QR is read as part of the document, not as a substitute for the visible fields.
Input credit depends on the supplier’s GSTIN matching what the portal holds when the returns are reconciled. Exact capture is the only thing extraction can guarantee, so every GSTIN is validated, scored, and reviewed before export. Confirm the matching and reconciliation rules with your tax advisor or the GST portal for your period.
Why bring-your-own-AI matters for GSTIN extraction
Reading a 15-character alphanumeric off a WhatsApp photo is vision work, and you should choose the model that does it. Bring your own key and pay your provider’s rate with zero markup, or run locally with Ollama; on Pro and Ultra the processing is unlimited and never counts against your allowance.
Clean digital invoices parse deterministically for free, identical results every run. Whatever the reader, the format check runs on every GSTIN, two-digit state code, ten-character PAN, entity digit, and check character, so validation is uniform even when the reading model is not.
Supplier, customer, and consignee numbers come out as separate role-tagged fields, so a transposed digit stands out before it reaches input credit. Corrections are remembered per layout, and the validated GSTINs export as their own columns, yours to keep.
Questions, answered
Does it validate the GSTIN format?
Yes. Each GSTIN is checked against the 15-character structure — length, two-digit state code, the PAN pattern in the middle, and the entity and check characters at the end — and values that fail the pattern are flagged.
Are supplier and customer GSTINs kept separate?
Yes. Supplier, customer, and consignee numbers are extracted as separate role-tagged fields, so the supplier’s number never lands in the customer’s column.
Does it read the GSTIN from an e-invoice QR code?
Where a QR code is present it is read and cross-checked against the printed GSTIN. The visible field is still extracted and confidence-scored either way.
What happens if a GSTIN is mistyped?
A value that doesn’t fit the format is caught by the pattern check, and a value that fits but reads unclearly goes to your review queue. Because a wrong supplier GSTIN can break input credit matching, every GSTIN is confirmed before export. Confirm reconciliation rules with your tax advisor or the GST portal.
Related document workflows
Open app, no card needed.