Invoice Payment Processing
Automatically read a vendor invoice, extract its details and line items, reconcile the charges against its stated total, and route only the exceptions to a person before payment.
The business problem
Vendor invoices — from defense counsel, IMEs, investigators, restoration vendors, repair shops, and other service providers — arrive against open claims in whatever format the vendor sends: email, portal, EDI, mail, PDF. Someone has to open each one, index it to the right claim, check the charges, and route it for payment — time that comes out of claim work, not invoice triage. Discrepancies like duplicated or out-of-scope line items and totals that don't add up are easy to miss one invoice at a time, and compound across a book of business.
The Invoice Payment Processing template automates that pass: it extracts the invoice details and every line item, reconciles the line items against the invoice's stated total, and writes payment insights and a recommended action — so a reviewer only sees the invoices that don't reconcile, are missing required information, or were extracted with low confidence.
Trigger and source data
The template ships with the Manual File Upload trigger. You can configure other triggers if you'd like, including a connection to an Outlook email inbox. See Configure triggers.
To run the template, upload a vendor invoice, along with any cover correspondence that travels with it. By default, the template works entirely from the uploaded content.
Template starting point
Create an AI agent from the Invoice Payment Processing template for a working flow that extracts, reconciles, validates, and routes for review out of the box. Open it in the canvas, select an environment, click Start Editing, and adjust it to your invoice mix — field prompts, extraction rules, or validation thresholds. See Create an AI Agent.
What the template preconfigures
The template will execute the following nodes:
| Step in the flow | Node it uses | Category |
|---|---|---|
| Prepare the uploaded files | Read Files | Utility |
| Extract the invoice details (claim number, policy number, claimant, vendor, invoice number, dates, total, bill type) | InsurGPT: Custom | InsurGPT |
| Extract every billed line item | InsurGPT: Custom | InsurGPT |
| Reconcile the line items against the invoice's stated total | Custom Code Blocks | Utility |
| Generate the payment insights — summary, due-date note, charge coherence, payment risk flags, and a recommended action | InsurGPT: Custom | InsurGPT |
| Check extracted values and the reconciliation result against rules | Field Validation | Utility |
| Branch on whether review is required | If | Control |
| Route the invoice to a person, only when needed | Review | Utility |
| Summarize the actions taken, whether or not review ran | Custom Code Blocks | Utility |
| Close out the item | Complete | Action |
What builders must configure before deployment
- Field sets and bill-type categories. Tune the extraction prompts and the bill-type categories to the vendor types and claim lines you actually process.
- Validation thresholds and review routing. Set confidence thresholds and the reviewer assignment to your standards. See Utility nodes.
- A connection to your claim and fee-agreement systems. We recommend an HTTP node after validation to look up the claim and its fee agreement, followed by a Custom Code Block to apply your own rate and authority checks.
How the AI agent behaves
The agent extracts the invoice details, then every line item, in two passes so each can carry its own field set.
A Custom Code Block sums the line items and compares the total to the invoice's stated total, returning Match, Mismatch, or Unable to Verify with a reconciliation detail explaining the arithmetic. A second InsurGPT pass factors that result into a plain-language invoice summary, a due-date note, a charge-coherence check that names any duplicate or out-of-scope line items, and payment risk flags such as an overdue or future-dated invoice or a bill date inconsistent with its own cover correspondence. The same pass writes a recommended action addressed to the reviewer, and it never recommends approval when reconciliation didn't match.
Low-confidence or missing fields are flagged by validation rather than invented, and Grounding ties each extracted value back to its place on the page.
Human review model
Review happens on the item in the Bevaya Platform.
- The Insights tab opens with an AI recommendation, key fields (claim number, vendor name, total amount), the invoice summary, the billing reconciliation detail, and payment risk flags.
- The Review tab is organized by group — Claim Identification, Invoice Details, Line Items, Billing Reconciliation, Payment Insights, and Outcome — where the reviewer confirms values, corrects a mistranscribed amount, and approves.
When an invoice is routed for review, the exception reason names the specific fields that were flagged — for example a reconciliation mismatch or a missing invoice number — so the reviewer knows exactly what to check first. See Human review.
Run status and reporting
Each invoice becomes an item that moves through the standard lifecycle statuses — In Progress, Review, Complete, Failed, Canceled. Watch individual runs and inspect each step's input, output, and status in Run history, and see live counts of items by status on the Item status reporting page.
Example run
A restoration vendor submits an invoice for $4,200 against an open property claim, itemizing water extraction, drying equipment rental, and a routine gutter cleaning. The scan is faint enough that the invoice number comes back low-confidence.
- The flow reads the file and extracts the invoice details and its three line items.
- It sums the line items to $4,200 and reconciles cleanly against the invoice's stated total — a Match.
- The payment-insights step flags the gutter-cleaning line as out of scope for a water-damage repair in its charge-coherence note.
- Validation flags the low-confidence invoice number, and the item routes to review with that reason named.
- The reviewer opens the item, corrects the invoice number, reads the charge-coherence note, removes the gutter-cleaning line, and submits. The item is marked complete.
Common failure modes
- An invoice's line items don't match its stated total. The flow always flags this for review rather than silently accepting or averaging it — the gap is commonly explained by a deductible, discount, or fee the invoice doesn't break out as its own line, but it's the reviewer's call to confirm against the source document.
- Duplicate or out-of-scope line items. The payment-insights step names any it notices in its charge-coherence note, so a reviewer already on the item has that context. Add a Field Validation rule on
charge_coherencealongside the existing rules to have it route the invoice to review on its own. - Low-confidence or missing required fields on a poor scan. Flagged by validation and surfaced for review rather than guessed.
Recommended rollout path
- Connect it to your claim and fee-agreement systems. Add the HTTP and Custom Code Block nodes for your claim lookup, rate checks, and authority rules.
- Build and test on real invoices. Use Run Draft on representative invoices across your vendor mix, inspecting each step. See Test and debug a draft.
- Pilot with a reviewer to confirm extraction, reconciliation, and risk-flag accuracy on your document mix.
- Promote to production. Publish the flow and configure your production trigger. See Drafts and publishing.
Where to go next
- Utility nodes — Field Validation, Custom Code Blocks, and Review.
- InsurGPT nodes — extraction and insights.
- Control nodes — If.
- App integration nodes — connect a write-back to your own systems.
- Human review — the Insights and Review tabs the reviewer works from.
- Item status reporting — track invoices by status.
- Medical Bills Identification and Extraction — a related template for identifying and extracting medical bills before they reach payment processing.
- Use cases overview — the full catalog of supported patterns.