DEV Community

Subhendu Das
Subhendu Das

Posted on

AI‑Powered GST Reconciliation: The GSTR‑2B Matching Feature

The GSTR‑2B Matching Engine

The Problem

Indian SMBs and accounting practices juggle dozens of invoices every month, each one a potential source of Input Tax Credit (ITC). The GST portal’s GSTR‑2B, a monthly snapshot of suppliers’ invoices, is designed to help businesses reconcile their books. In practice, the manual comparison between the GSTR‑2B and a company’s purchase maje a tedious, error‑prone chore that often leads to ITC leakage.

Typical pain points include:

  • Missing or mismatched invoices – An invoice that appears in the books but not in GSTR‑2B, or vice‑versa.
  • Duplicate entries – The same invoice number showing up twice in the portal or the books.
  • Incorrect place‑of‑supply – The portal uses a code, while many SMBs only know the name, leading to mismatches.
  • Large volumes of data – Hundreds of PDFs, images, and Excel files that must be parsed and compared.

These issues can result in missed ITC or, worse, penalties for filing incorrect returns. The need for a fast, accurate, AI‑driven reconciliation tool is clear.

How It Works

GSTBot’s GSTR‑2B matching feature is built on a stack that blends modern web frameworks with robust AI models. The core workflow is:

  1. Data Ingestion – Invoices are uploaded via a nətive file picker, drag‑and‑drop folder, or a batch upload API. Tesseract OCR parses PDFs and images; for Excel files, the spreadsheet columns are read directly.
  2. Field Extraction – Vendor GSTIN, invoice number, amount, tax rate, and HSN code are extracted. The system also resolves the place of supply by matching the supplier’s name to the code in the portal, a change introduced in the latest commit that eliminates the need for manual code entry.
  3. Database Normalization – Extracted invoices are stored in PostgreSQL. A Redis cache holds the GSTR‑2B snapshot for the current month, loaded once per user session to reduce database I/O.
  4. Reconciliation Engine – Using Celery workers, the engine scans the local invoices against the GSTR‑2B snapshot. It flags:
    • Missing invoices – Present in books but absent in GSTR‑2B.
    • Unmatched rows – Where the supplier’s records are flagged as the user’s own books’ fault.
    • Duplicates – Identical invoice numbers detected in both sources.
    • Amount mismatches – Discrepancies in taxable value or tax amount.
    • Default suppliers – Suppliers flagged by the portal for default status.
  5. ITC Calculation – After reconciliation, GSTBot calculates the eligible Input Tax Credit, taking into account Rule 37/42/43 reversals. This is crucial for preventing ITC leakage.
  6. Export & Filing – The mismatches and reconciled data are exported as GST‑portal‑compatible JSON or CSV, ready for bulk upload into GSTR‑1 and GSTR‑3B.

The engine’s performance was improved in recent commits: a supplier’s exposure is now computed without loading all invoices, and the period index search uses the direction requested by the user. These optimizations mean that even a batch of thousands of invoices is processed in seconds, not minutes.

User Experience

From the perspective of an SMB owner or CA, the reconciliation feature feels like a single‑click sanity check. After uploading a folder of invoices, the dashboard shows a concise table:

Supplier Missing Duplicate Amount Mismatch Default
ABC Pvt Ltd 2 0 1 No
XYZ Traders 0 1 0 Yes

Clicking a row expands detailed information: the invoice number Invalid, the portal’s record, and a side‑by‑side comparison of amounts. The UI also displays a small icon indicating whether the mismatch is due to a portal error or a book‑keeping mistake, a feature added in the “say which unmatched rows are your own books’ fault” commit.

For users who need to process multiple GSTINs, a single login can now access all linked accounts, thanks to the new “let one login reach the other GSTINs it holds” feature. The interface automatically switches context when a different GSTIN is selected, keeping the workflow streamlined.

When a user prepares to file, GSTBot pre‑fills GSTR‑1 and GSTR‑3B JSON/CSV files. The portal‑compatible format ensures that bulk uploads succeed without the portal rejecting the return. The system also warns about any potential Rule 37/42/43 reversals, giving users time to correct them before filing.

Impact

By automating GSTR‑2B matching, GSTBot eliminates manual spreadsheet comparisons, reduces the risk of ITC leakage, and speeds up the entire GST compliance cycle. SMB owners who previously spent hours cross‑checking invoices now spend minutes verifying a concise report. The result is a reliable, AI‑powered GST reconciliation software that scales from a single GSTIN to dozens, all for a fraction of the cost ofraagt ClearTax Pro or Taxilla.


References:

Top comments (0)