DEV Community

Subhendu Das
Subhendu Das

Posted on

How GSTBot Handles GSTR-2B Matching and ITC Leakage

The reconciliation gap that costs SMBs real money

Every month, Indian SMBs and their accountants sit down with two datasets: the purchase register they built from vendor invoices, and the GSTR-2B auto-drafted by the GST portal from supplier filings. In theory they match. In practice, invoices land in the wrong period, vendors file late or not at all, HSN codes drift, and tax amounts differ by a few rupees — enough to block Input Tax Credit (ITC) claims under Rule 37, 42, or 43. The manual workaround is hours of VLOOKUPs, pivot tables, and back-and-forth emails with suppliers. For businesses priced out of ClearTax Pro and Taxilla, that work often stays undone, and eligible credit leaks away.

What the reconciliation engine actually does

GSTBot ingests invoices three ways: phone photos (via Tesseract OCR), PDFs, and bulk Excel uploads. From each document it extracts the vendor GSTIN, invoice number, date, taxable value, tax rate, and HSN code. A background worker (Celery + Redis) then pulls the corresponding GSTR-2B JSON for the same GSTIN and period, normalises both sides to a common schema, and runs a deterministic match on GSTIN + invoice number + date + amount.

The result is a four-quadrant view:

  • Matched — identical on all keys; ITC is safe to claim.
  • Amount mismatch — same invoice, different taxable value or tax; flagged for amendment or supplier follow-up.
  • Missing in 2B — present in your register but absent from the portal; likely a defaulting or late-filing supplier.
  • Extra in 2B — appears in GSTR-2B but not your books; possible duplicate entry or a purchase you never recorded.

Each row shows the exact field-level delta (e.g., "CGST ₹42.50 vs ₹43.00") so the accountant can decide: amend the return, chase the vendor, or write off the credit.

ITC eligibility and reversal flags in the same pass

Once the match is done, GSTBot applies the ITC eligibility rules encoded in the GST Acts. It checks:

  • Whether the supplier has filed GSTR-1 and GSTR-3B (supplier filing reliability score).
  • Whether the invoice is older than 180 days without payment (Rule 37 reversal trigger).
  • Whether the input is used for exempt supplies or personal consumption (Rule 42/43 proportional reversal).

The output is a single worksheet: eligible ITC, provisional ITC blocked by mismatches, and reversal amounts categorised by rule. No separate spreadsheet, no cross-referencing.

From reconciliation to return-ready files

The final step is export. GSTBot emits GSTR-1 and GSTR-3B payloads in the exact JSON and CSV schemas the GST portal accepts. The B2B, B2C, CDNR, and HSN summary sections are pre-filled from the reconciled data. The accountant downloads, validates once in the offline utility, and uploads — no re-typing invoice lines.

What it feels like to use

Upload a folder of vendor PDFs on Monday morning. By the time you finish coffee, the dashboard shows 312 invoices ingested, 287 matched, 14 amount mismatches, 7 missing in 2B, 4 extra in 2B. Click a mismatch row and you see the vendor GSTIN, both amounts side by side, and a "Request amendment" button that drafts an email to the supplier. Click "Export GSTR-3B" and a portal-ready CSV lands in your Downloads folder. The whole flow stays in the browser; no desktop agent, no licence key, no per-GSTIN surcharge.

Built for the team that does the work

The stack — FastAPI, React, Vite, PostgreSQL — runs on a single Docker Compose file or the hosted version at gstbot.aiknol.com. Multi-GSTIN support means a CA practice can switch clients in the header without logging out. Role-based access lets the junior accountant upload and match, while the partner reviews only the reversal summary before signing off.

Bottom line

GSTR-2B matching is not a nice-to-have report; it is the gatekeeper for every rupee of ITC an SMB claims. GSTBot turns that gate from a manual spreadsheet slog into an automated, auditable pipeline — so the credit you earned actually reaches your electronic credit ledger.

Top comments (0)