DEV Community

R VIKRAM
R VIKRAM

Posted on

Reconciling GST invoices against GSTR-2B with a script, not a spreadsheet

Every month, Indian SMEs compare two lists that should agree: the invoices in their books and the ones suppliers reported in GSTR-2B. They rarely agree, and the gap is where input tax credit quietly leaks.

I got tired of doing this by hand, so I built a small script-first skill that does the reconciliation and produces a report I can actually show someone.

The problem

The usual leaks are unglamorous: ITC claimed on invoices the supplier never reported, amounts that don't match, CGST/SGST booked where IGST should be, purchases never recorded, and the same invoice entered twice. Found by hand, slowly — or found too late, at filing time.

How it works

The workflow is gated, in four stages:

  1. Validate the input CSV. Every row's taxable + taxes must equal its total before anything runs.
  2. Reconcile. A stdlib-only Python pipeline matches on (supplier GSTIN, invoice no.) and classifies every invoice: matched, amount mismatch, tax-split mismatch, missing in GSTR-2B, GSTR-2B only, or duplicated in the books. It totals ITC at risk, flagging high risk at INR 25,000+.
  3. Validate the output. A second script checks the schema, recounts every category, re-adds the totals, and must print zero errors before anything is handed over.
  4. Report. A JSON evidence pack plus a Markdown report with a findings table and prioritised action items. Anything unverified is tagged [ASSUMPTION], never silently treated as matched.

No GST portal access, no network, no third-party packages. Your CSV stays on your machine.

The proof

I ran it on the bundled fictional sample: 12 books rows vs 11 GSTR-2B rows.

  • 7 matched
  • 1 amount mismatch, 1 tax-split mismatch
  • 2 missing in GSTR-2B, 2 in GSTR-2B only
  • 1 duplicate in the books
  • INR 49,500 of ITC flagged at risk

The output validator ran 19 checks and passed all of them — 0 errors. The two missing invoices carried the risk: INV-1004 (INR 36,000) and INV-1005 (INR 13,500).

Try it

The sample data is fictional and labelled as an example. One honest note: this is a reconciliation tool, not tax advice — a CA should review before any filing or ITC claim.

If you reconcile GST by hand every month, what eats most of your time — chasing suppliers, or fixing the mismatches?

Top comments (0)