WhatsApp AI chatbot for business: what the Business API really costs and how to architect it
A WhatsApp AI chatbot is priced per message, gated by a 24-hour window and limited by Meta's AI policy. Here is what that does to cost and architecture.
Extracting fields from GST invoices is easy to demo and hard to trust: GSTIN checksums, e-invoice QR codes, tax-split logic and arithmetic checks are what separate a pipeline you can post to Tally or an ERP from one that fails an audit.
If you run accounts payable for an Indian business, you already know the shape of the problem: invoices arrive as PDFs, phone photos and scans from hundreds of vendors, no two laid out alike, and someone retypes them into Tally or an ERP. GST invoice extraction with AI is the obvious fix, and a demo is easy: upload an invoice, get JSON back. The part that decides whether finance will trust it is the validation you build around the model.
This post covers what is specific to Indian GST invoices and how to use that structure to make extraction checkable. For the general failure modes of document AI, see Document intelligence is not OCR.
Generic invoice tools model a supplier, a date, line items and a total. A GST invoice adds fields that carry legal and tax meaning:
Each of those is both a field to extract and a way to check the extraction. That redundancy is the opportunity: a generic model can only report its own confidence, while a GST pipeline can test its output against rules the document must obey.
A GSTIN is 15 characters. Per the structure described by
Razorpay
and encoded in the open-source
python-stdnum validator:
characters 1-2 are the state code, 3-12 are the holder's PAN, character 13
counts registrations for that PAN in the state, 14 is a fixed Z, and 15 is
a check character computed with Luhn mod 36.
That gives you three free tests, none needing a network call:
OCR confusions such as O/0, I/1 and S/5 are exactly what the
checksum catches. A useful trick: when the checksum fails, try the common
confusable substitutions and accept a candidate only if it passes. Never
"fix" silently without logging it.
A valid checksum proves the string is well-formed, not that the registration is active. Checking that a supplier is currently registered is a separate lookup, and it belongs in the vendor-onboarding flow rather than per invoice.
Invoices must add up. Before anything is posted:
| Check | Rule | What a failure usually means |
|---|---|---|
| Line math | quantity x rate - discount = line taxable value | Misread quantity or rate |
| Tax split | Same-state supply: CGST and SGST equal; interstate: IGST only | Wrong place of supply or a misread tax column |
| Tax rate | Tax = taxable value x rate, within rounding | Misread rate or amount |
| Totals | Sum of lines + tax (+ round-off) = invoice total | Missing line, merged table row, bad total |
| GSTIN state vs tax type | Supplier state code vs place of supply decides CGST/SGST vs IGST | Wrong GSTIN or wrong tax type |
These tests need no model at all, and they target the failure that hurts most: a confident number that is wrong. They are also what makes a table-heavy invoice safe to automate, since table extraction is where models degrade quietly.
Under the CBIC notification 10/2023-Central Tax, e-invoicing applies to B2B supplies from businesses above INR 5 crore aggregate turnover, effective 1 August 2023 (turnover is counted across GSTINs under the same PAN). So a growing share of the B2B invoices you receive carry an IRN and a signed QR code, as explained in Tally's e-invoicing guide.
Treat those as a second source of truth:
Check the current threshold yourself before relying on it: it has been revised more than once, and some vendor pages still quote the older figure.
Use the model for what rules cannot do: finding fields across inconsistent layouts, reading handwritten amendments, and mapping vendor descriptions to your item or ledger master. Ask for structured output against a fixed schema (see LLM structured output in production), and keep the deterministic checks outside the model so they are testable.
A pipeline that holds up looks like this: layout-aware extraction, schema- constrained LLM pass, deterministic validators (GSTIN, arithmetic, tax split, QR cross-check), then a confidence-based routing step into a review queue. Posting to Tally or an ERP happens only from the cleared side.
Per-invoice cost is dominated by page count and whether you need a vision model or can use text extracted from the PDF. Digital PDFs are far cheaper than scans, so first test whether your volume is mostly digital. We have not published a price here because it depends on your volume mix; measure it on a sample of your own invoices.
Invoices contain personal and commercial data, so decide early what leaves your environment. The DPDP Act post and PII redaction before LLM calls cover the controls.
If you want help designing this pipeline, see our document intelligence service, or talk to the team in Pune or Mumbai.
Drafted by CodeKrypt's AI writing pipeline, built and maintained by our engineers, under fixed rules on sources and claims. How we write
A WhatsApp AI chatbot is priced per message, gated by a 24-hour window and limited by Meta's AI policy. Here is what that does to cost and architecture.
The ingest-classify-extract pipeline is not the hard part of document AI. What breaks in production is messy scans, tables, and knowing when to trust an extraction — here's the review-queue pattern that actually works.
Enterprise buyers ask to use their own LLM provider account or encryption keys. What BYOK means in an AI SaaS product, how to store customer keys, and what it does to cost, support and quality.