When an invoice differs from an agreed amount, the first job is to identify the mismatch and locate the records behind it. This kit compares supplied totals and prepares an internal clarification draft when the facts support one.
Free, stateless starter kit. Real connections and actions require a separately agreed implementation.
The job
When this check is useful
Review one invoice before asking a colleague to explain a total difference. This is a total comparison, not line-item matching, bookkeeping, tax treatment or financial advice.
Start with these source facts
invoiceId
A short identifier for locating the original invoice. The kit does not fetch that document.
currency, expectedCurrency
The invoice and expected-total currencies. They must match; the kit does not convert currencies.
expectedCents, invoicedCents, paidCents
Three known integer-cent totals, each from 0 to 10,000,000,000. Null means unknown, never zero. Establish the expected total from your agreed scope or purchase record.
asOf, observedAt
Explicit UTC evaluation and observation timestamps. The sample freshness policy holds snapshots older than seven days or dated in the future.
Supported currencies: USD, EUR, GBP, CAD, AUD. Amounts are integer cents; no exchange-rate conversion is performed.
Computed examples
See what passes and what needs review
These are fictional records evaluated at their stated asOf time, not live business data. Results below come from the same rules as the free kit. A ready state permits preparing an unsent draft; it does not authorize an action.
Known source facts
Result: ready
The invoice total differs from the expected total; an internal clarification draft can be prepared.
Total comparison
Invoiced minus expected: 10000 integer cents in the supplied matching currency.Source: invoicedCents / expectedCents
Payment context
Supplied unpaid balance: 110000 integer cents. No collection or refund is authorized.Source: invoicedCents / paidCents
Evaluated at 2026-10-12T12:00:00Z. Simulation: true. No draft requested; nothing sent or saved.
Currency mismatch: stop the comparison and confirm the sources.
Payment above the invoice total: review credits, duplicate payments or source errors manually.
Missing, negative or fractional-cent totals: hold for source review. Matching totals: no discrepancy action, even if an unpaid balance remains.
What a useful result must do
The fictional 110,000-cent invoice versus a 100,000-cent expected total reports a 10,000-cent difference.
A matching-currency discrepancy with known amounts can produce an internal draft; unknown amounts cannot.
No result changes a ledger, issues a refund, collects money or establishes which party is correct.
Check what you already have
Your existing tool may cover this
Can your accounting system already compare an invoice with its estimate or purchase order?
Are tax, shipping, credits and approved scope changes already included in the expected total?
Can your billing reviewer use the existing exception queue and approval history?
A scoped implementation would define the authoritative expected amount, treatment of adjustments and who can resolve a mismatch. We would check the accounting tool’s existing matching and approval features before proposing a connection.
Run the free kit yourself
Use an AI client that supports local MCP tools and Node.js 20 or later. This pinned command starts the invoice-discrepancies kit over standard input/output:
The two tools analyze a supplied record and prepare an unsent draft. The kit makes no provider calls and does not persist the input. Review your chosen AI client’s data handling before supplying business records; that client may require its own subscription or model charges.
Start with the workflow, current tools and the person who reviews exceptions. We agree the scope and fee in writing before paid work. Connections, sending, record updates, ongoing monitoring and maintenance are outside the free kit and must be scoped explicitly.