Tax Compliance & Extraction

Tax Invoice & GSTIN Field Extraction Guide

Commercial B2B tax invoices require specialized optical recognition beyond consumer receipts: vendor GSTIN formats, intra-state CGST/SGST vs inter-state IGST splits, and invoice number normalization.

1. Deconstructing the 15-Character GSTIN Structure

Indian GST identification numbers follow a strict statutory 15-character format:

27   AAAPL   1234   C   1   Z   V
[1]   [2]     [3]  [4] [5] [6] [7]

[1] State Code (01-37)
[2] 5 Alphabetic Characters (PAN Entity Code)
[3] 4 Numeric Characters (PAN Sequence)
[4] 1 Alphabetic Checksum (PAN Check)
[5] Entity Count Code (1-9 or A-Z)
[6] Default Alphabet 'Z'
[7] Checksum Validation Digit

Apex Forge Regex validates this exact structure to eliminate typographical OCR errors before database storage.

2. Dual-Tax vs Integrated Tax Accounting

The invoice parser checks the vendor state code against the buyer state code:

  • Intra-State: Tax is split into equal CGST (Central GST) and SGST (State GST) line items.
  • Inter-State: Single unified IGST (Integrated GST) rate applied.

Our reconciliation engine validates: Item Subtotal + CGST + SGST (or IGST) = Grand Total.

Automate Your Tax Invoice Pipeline

Use Apex Forge OCR with the /receipt command to extract verified tax fields in seconds.

Open Apex Forge OCR →