Structure of a 15-Digit Indian GSTIN
Every GST identification number in India conforms to the following 15-character pattern:
[State Code: 2 Digits][PAN: 10 Chars][Entity Number: 1 Char][Default 'Z'][Checksum: 1 Char]
Example: 27 AABCS 1429B 1 Z 6
The Modulo-36 Calculation Logic
The 15th character is a mathematically calculated check-digit derived using a base-36 character set (0-9 followed by A-Z):
- Assign code points 0 through 35 to characters
0-9A-Z. - Traverse the first 14 characters, alternating weight factors of 1 and 2.
- Multiply the code point by the factor, add the quotient and remainder divided by 36.
- Calculate the modulo-36 remainder and derive the expected 15th check character.
EntryFlow validates this locally in sub-millisecond time on every incoming invoice before running LLM extraction, eliminating invalid vendors before they enter your accounting system.