Cross-functional · Playbook 60

Invoice processing (accounts payable)

Every supplier invoice read, checked, matched and coded before anyone opens it, exceptions explained, and people approving every payment and every change to supplier bank details.

  • Document AI
  • Agents with tools
  • Human in the loop
  • HMRC Making Tax Digital for VAT
  • HMRC VAT invoice rules
  • Payment practices reporting
  • ECCTA 2023
  • UK GDPR

At a glance

The problem
Invoices arrive as PDFs, scans and portal uploads, then get keyed, matched and chased by hand, so suppliers wait and errors slip through
Typical volume
Around 25,000 invoices a month from 3,000 suppliers, about 70% against a purchase order
Who's involved
Accounts payable, procurement, budget holders, the financial controller, tax, internal audit, IT
Pilot
8–10 weeks on one legal entity's PO-backed invoices, after a 3-week discovery
Platforms
AWS, Azure, or a sovereign or on-prem stack

An illustrative scenario. The numbers are typical examples, not a client case study. The cloud services and UK rules were checked on 9 November 2026.

The business problem

Supplier invoices arrive in every shape: PDFs attached to emails sent to a shared mailbox, paper invoices scanned in the post room, uploads through a supplier portal, and a minority as structured files. Each one has to be read, checked against VAT rules, matched to a purchase order and a goods receipt, coded to the right cost centre and VAT code, and sent to the right budget holder. In many organisations, most of that is still done by hand.

In a typical large organisation, a third of invoices fail the first match: a price that differs from the order, a part delivery, a missing goods receipt, or a PO number nobody quoted. These exceptions sit in inboxes while suppliers chase payment. Duplicates get through when the same invoice arrives by email and by post. Invoices without a valid VAT number or VAT breakdown are paid anyway, and the input tax is claimed on weak evidence.

The riskiest moment in accounts payable isn't the invoice at all. It's the email that says a supplier has changed its bank account. Bank detail change fraud, often after a supplier's email has been compromised, is one of the most common ways organisations lose money. Payment performance is also public: large companies report how quickly they pay every six months, and the government plans much tougher rules on late payment. Faster processing only helps if controls get stronger, not weaker.

What AI changes

  • Every invoice is read within minutes of arriving, whatever the channel, and its header, lines, VAT breakdown and bank details are extracted with a confidence for each field.
  • VAT invoice checks run before anything else: required details present, VAT number checked with HMRC, VAT arithmetic correct. Invoices that fail go back to the supplier with a specific reason, not into the ledger.
  • Two- and three-way matching still runs in your finance system, under its own tolerances. The AI takes what fails: it finds the likely cause, such as a price change, a part delivery or a missing receipt, and drafts the fix or the query.
  • Suggested GL, cost centre and VAT codes come from your coding rules and how similar invoices were coded before, each with a reason. A person accepts or corrects them.
  • Any invoice whose bank details differ from the supplier master is stopped and sent to the supplier master data team. The AI never changes bank details, and never approves or releases a payment.
  • Possible duplicates are caught across channels and legal entities, and the payment practices data (received date, due date, paid date, disputes) is captured as the work is done.

How success is measured

Agree these, and measure the baseline, before anything is built. Example targets are typical, not promises.

Straight-through rate

PO-backed invoices that reach the approval queue already matched and coded, with no manual keying.

ExampleFrom about 30% to 70–80%

Cycle time

Days from an invoice arriving to being approved for payment.

ExampleFrom 12 days to under 4

Paid within terms

The share of invoices paid by the agreed due date, as reported under payment practices reporting.

ExampleUp by a quarter

Exception ageing

Unresolved exceptions older than five working days, by reason and owner.

ExampleDown by two thirds

Duplicate and wrong payments

Duplicates caught before payment, and any payment made to a wrong or fraudulent account.

ExampleZero paid to a changed account without a call-back

Coding acceptance rate

How often AP accepts the suggested codes unchanged. Very high can mean nobody is checking; very low means it isn't helping.

ExampleStable, and sampled weekly

UK regulation and controls

Cross-sector rules are on the UK regulation map.

  • HMRCMaking Tax Digital for VAT (VAT Notice 700/22)

    VAT records must be kept digitally, and data must move between the programs that make up your VAT system through digital links: API transfers, file imports, linked cells. Copy and paste and re-keying don't count. So the AI posts extracted invoice data to your finance system through its API, never via a person copying totals across, and the VAT return still comes from your finance system's MTD-compatible software.

  • HMRCVAT invoice content and record keeping (VAT Notice 700/21)

    A full VAT invoice must show, among other things, a unique sequential number, the time of supply, the supplier's name, address and VAT number, a description, and the VAT rate and amount for each item; simplified invoices are only allowed for supplies of £250 or less. The invoice is the main evidence for reclaiming input tax, so the AI checks every required field and flags gaps. A person in AP or tax decides what to do with an invalid invoice, and VAT records are kept for at least six years.

  • Department for Business and TradeReporting on Payment Practices and Performance Regulations 2017 (as amended in 2024)

    Large companies and LLPs report every six months on how long they take to pay, the share of invoices paid within 30, 31–60 and over 60 days, the share paid late and, since the 2024 amendments, the share of disputed invoices paid outside terms. The duty now runs to 6 April 2031. The design captures received, due, disputed and paid dates as data, so the report comes from the system rather than a spreadsheet.

  • Home Office and SFOFailure to prevent fraud (Economic Crime and Corporate Transparency Act 2023, in force 1 September 2025)

    Large organisations can be liable when an employee or someone acting for them commits fraud intended to benefit the organisation, such as false accounting, unless they had reasonable procedures (Home Office guidance, November 2024). It doesn't cover fraud where the organisation is the victim, such as bank detail change fraud, which is controlled for its own sake. AP evidence matters either way: who changed what, who approved it, and segregation of duties enforced by the finance system.

  • Payment Systems RegulatorConfirmation of Payee (Specific Direction 17, varied October 2026)

    Banks check the payee's name against the account before a Faster Payment or CHAPS payment, and the PSR removed the direction's expiry date in October 2026. Use it, through your bank, whenever a supplier's account is set up or changed. It checks the name matches the account; it doesn't prove the change request is genuine, so a call-back to a number you already hold is still required.

  • ICOUK GDPR and the Data Protection Act 2018

    Invoices from sole traders and partnerships, and supplier contacts and bank details, are personal data. That means a DPIA, processing in UK regions, a clear retention period, access limited by role, and a contract that stops providers training their models on your data.

The solution

Showing AWSAzuresovereign / on-prem services. Switch with the toggle; every diagram and table on this page follows it.

Invoice processing (accounts payable): reference architecture
  1. 01Channels

    • Supplier email to AP mailbox
    • Post room scans
    • Supplier portal and structured files
  2. 02Intake

    • Amazon SESLogic Apps email connectorYour existing mail serverInbound email
    • API GatewayAPI ManagementKong, or your existing API gatewayPortal and file API
    • S3 Object LockBlob immutable storageCeph with S3 Object LockInvoice store (write-once)
  3. 03Intelligence

    • Amazon Textract (AnalyzeExpense)Content Understanding (Document Intelligence)Docling plus an open-weight vision modelRead invoices
    • Bedrock Knowledge BasesFoundry IQ (Azure AI Search)OpenSearch, or PostgreSQL with pgvectorCoding rules and past invoices
    • Agent
      Bedrock AgentCoreFoundry Agent ServiceLangGraph on Kubernetes, with open-weight models via vLLMAP exception agent
  4. 04Orchestration

    • Step FunctionsLogic Apps / Durable FunctionsTemporalInvoice workflow
    • EventBridge + SQSEvent Grid + Service BusApache Kafka or RabbitMQEvents and queues
  5. 05Systems of record

    • Your ERP or finance system (POs, receipts, ledger, matching)
    • Supplier master data
    • Your bank's payment and Confirmation of Payee services
  6. 06People

    • Person
      AP clerk: works exceptions, accepts coding
    • Person
      Budget holder: approves the invoice
    • Person
      Supplier master team and treasury: bank changes, payment runs
  • Cloud or platform service (AWSAzuresovereign / on-prem)
  • AI agent
  • A person decides
  • Your existing systems
  • Outside your organisation

Components, side by side

Invoice processing (accounts payable): components on AWS, Azure and a sovereign or on-prem stack
LayerAWSAzureSovereign / on-prem
Intake: email, scans, portalKeep the original file and its arrival time. The received date drives payment terms and payment practices reporting.Amazon SES, API Gateway, Amazon S3Logic Apps connectors, API Management, Blob StorageYour mail server, Kong, Ceph or IONOS S3 Object Storage
Reading invoicesTest on real scans, multi-page invoices and credit notes, not clean samples. Structured e-invoices skip this step entirely.Amazon Textract (AnalyzeExpense); Bedrock Data Automation is an alternative and processes London requests in eu-west-2Azure Content Understanding (includes Document Intelligence's invoice model)Open-source parsing (e.g. Docling) plus an open-weight vision model
VAT checksRequired fields, VAT arithmetic and the supplier's VAT number, checked by code, not by a language model.AWS Lambda calling HMRC's VAT number checkAzure Functions calling HMRC's VAT number checkA small service on Kubernetes calling HMRC's VAT number check
Reasoning and draftingExplains exceptions and drafts supplier queries. Both clouds offer a choice of models, including Claude.Amazon BedrockMicrosoft FoundryOpen-weight models served with vLLM on your own GPUs, or IONOS AI Model Hub
Coding rules and history (retrieval)Your coding policy, VAT treatment notes and how similar invoices were coded before, so suggestions follow your rules.Bedrock Knowledge BasesFoundry IQ, built on Azure AI SearchOpenSearch, or PostgreSQL with pgvector
Agent runtimeThe original Bedrock Agents closed to new customers on 30 July 2026; new builds use AgentCore.Amazon Bedrock AgentCoreFoundry Agent ServiceAn open-source agent framework (e.g. LangGraph) on Kubernetes
WorkflowTracks each invoice to its due date and escalates exceptions that would make it late.AWS Step FunctionsLogic Apps or Durable FunctionsTemporal, or n8n
Middleware and eventsAmazon EventBridge, SQSEvent Grid, Service BusApache Kafka or RabbitMQ
Link to the finance systemInvoices are posted as parked or held documents through the finance system's own API. This is also your MTD digital link.API Gateway, plus your existing integration platformAPI Management, plus your existing integration platformKong or your existing API gateway, plus your existing integration platform
Human reviewAP and budget holders approve where they already work. Approval limits and segregation of duties stay in the finance system.In your finance system's AP workbench and approval workflowIn your finance system's AP workbench and approval workflowIn your finance system's AP workbench and approval workflow
GuardrailsInvoice text is untrusted input. A line saying 'ignore previous instructions' must change nothing.Bedrock GuardrailsFoundry guardrails (Azure AI Content Safety)Open-source guardrails (e.g. NeMo Guardrails, Llama Guard)
Identity, keys, data protectionThe agent's identity has no permission to edit supplier master data or payment runs.IAM Identity Center, KMS, MacieEntra ID, Key Vault, PurviewKeycloak or your existing Active Directory; OpenBao or HashiCorp Vault; an HSM
Monitoring and auditLog every extraction, suggestion, override and approval, with who and why.CloudWatch, CloudTrailAzure Monitor, Log AnalyticsPrometheus, Grafana, OpenTelemetry
UK data residencyIONOS AI Model Hub runs in German data centres: EU, not UK, residency.eu-west-2 (London)UK South / UK WestYour own UK data centre, or a UK or EU provider

On a phone, the table shows the platform you pick. Sovereign / on-prem means open, portable components you can run in your own data centre or with a UK or European provider; IONOS is shown as one example, and others exist. What sovereign cloud means →

Hybrid and on-prem

Many organisations keep core systems and sensitive data on their own servers. This is how the same design works across both.

Stays on-prem

Your ERP or finance system, supplier master data, the payment run and the bank connection stay where they are. Many organisations run these on their own servers, and nothing here needs them to move.

Uses cloud AI

Invoice reading, coding retrieval and the exception agent can run in a UK cloud region, or on your own GPUs with open-weight models if supplier and bank data must not leave your estate.

How they connect

A private link (AWS Direct Connect or Azure ExpressRoute) and the API layer. The invoice image and the PO and receipt lines it needs go out; extracted data and suggestions come back as events onto your queue.

If the link drops

Invoices keep arriving and queue on your side. AP keys and matches them as before, so suppliers still get paid on time, and the backlog is processed when the link returns.

The agents

What each agent may do through its tools, what it may not, and where a person signs off. The limits are enforced by the platform, not the prompt.

AP exception agent

May do

  • Read the extracted invoice, the purchase order, goods receipts and the supplier's history
  • Work out why a match failed and propose the fix: a price or quantity variance, a part delivery, a missing receipt
  • Suggest GL, cost centre and VAT codes, with the reason and similar past invoices
  • Flag likely duplicates and any bank details that differ from the supplier master
  • Draft a query to the supplier or a reminder to the budget holder, for AP to send
  • Park the invoice in the finance system and route it to the right approver

May not do

  • Approve an invoice or override a match tolerance
  • Create a supplier or change supplier bank details
  • Release, schedule or change a payment run
  • Post a journal or claim input VAT outside the finance system's normal process
  • Send anything to a supplier

Where a person signs offA budget holder approves every invoice, within approval limits set in the finance system. Supplier bank detail changes are made only by the supplier master data team after a call-back to a number already on file and a Confirmation of Payee check, and approved by a second person. Treasury releases every payment run. The agent's permissions are enforced by the platform's identity and policy controls and by the finance system's segregation of duties, not by instructions in a prompt.

Middleware and integration

The finance system is reached only through its API or your existing integration layer, never directly. Each invoice carries an ID made from the supplier, invoice number and amount, so a retry, or the same invoice arriving twice, never posts twice.

Matching stays in the finance system, under the tolerances finance already set and audit already understands. The AI works on what fails the match, and writes back a proposed action, not a decision.

Each arriving invoice becomes an event. If the AI is paused, invoices still land in the AP queue and are keyed and matched as before. If the finance system is down, invoices wait safely on the queue, and nothing is lost or posted twice.

Process and people

  • Segregation of duties written down and enforced in the finance system: whoever processes an invoice can't approve it, and nobody in AP can change bank details and release payments.
  • A bank detail change procedure that never relies on email: a call-back to a number already held, a Confirmation of Payee check, and a second approver, whatever the AI says.
  • An exception queue with a named owner per reason, and an ageing target linked to supplier payment terms.
  • A weekly sample review of accepted coding and VAT suggestions, with tax involved for reverse charge and partial exemption cases.
  • A named owner for the coding policy, each prompt and the extraction tests, with change control like any other financial control.
  • AP and budget holders trained before go-live, including what the AI can't see: a phone call with the supplier, or a contract change not yet in the PO.

Delivery plan

  1. 3 weeks

    Discovery

    Map today's channels, exception reasons and approval routes, measure cycle time and paid-on-time, review bank change controls, and pick the first legal entity.

  2. Gate · must be true to passBaseline agreed, finance system API access confirmed, DPIA started, tax and internal audit involved.

  3. 6–8 weeks

    Pilot

    PO-backed invoices for one entity in shadow mode: the AI extracts, matches and codes, AP works as normal, and the two are compared.

  4. Gate · must be true to passField accuracy and coding acceptance within agreed limits, no bank change missed, and internal audit content with the evidence.

  5. 4–6 weeks

    Production

    Extraction and the agent go live for the pilot entity, posting parked invoices through the API, with monitoring and a rollback plan.

  6. Gate · must be true to passMonitoring, support model, rollback plan, updated procedures and AP training in place.

  7. Ongoing

    Scale

    Add entities, then non-PO invoices and credit notes, then structured e-invoices as suppliers move to them.

  8. Gate · must be true to passEach new entity or invoice type passes the same shadow-mode gate.

Roles and RACI

Who is responsible, accountable, consulted and informed, by activity
ActivityFinance directorAP manager (product owner)Solutions architectI can fill thisTechnical PMI can fill thisEngineersI can fill thisTaxInternal auditSecurityI can fill this
Business case and benefitsAccountableResponsibleConsultedConsultedInformedConsultedInformedInformed
Target architecture and finance system integrationConsultedConsultedAccountable and ResponsibleConsultedConsultedConsultedConsultedConsulted
Controls design: segregation of duties, bank changesAccountableResponsibleConsultedInformedConsultedInformedConsultedConsulted
Build and integrationInformedConsultedAccountableResponsibleResponsibleInformedInformedConsulted
Accuracy testing on real invoicesInformedAccountableResponsibleConsultedResponsibleConsultedConsultedInformed
Go-live decisionAccountableResponsibleConsultedResponsibleInformedConsultedConsultedConsulted
Run, monitor and improveInformedAccountableConsultedConsultedResponsibleConsultedInformedConsulted

Business case and benefits

Finance director
A · Accountable
AP manager (product owner)
R · Responsible
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
I · Informed
Tax
C · Consulted
Internal audit
I · Informed
Security
I · Informed

Target architecture and finance system integration

Finance director
C · Consulted
AP manager (product owner)
C · Consulted
Solutions architect
A/R · Accountable and Responsible
Technical PM
C · Consulted
Engineers
C · Consulted
Tax
C · Consulted
Internal audit
C · Consulted
Security
C · Consulted

Controls design: segregation of duties, bank changes

Finance director
A · Accountable
AP manager (product owner)
R · Responsible
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
C · Consulted
Tax
I · Informed
Internal audit
C · Consulted
Security
C · Consulted

Build and integration

Finance director
I · Informed
AP manager (product owner)
C · Consulted
Solutions architect
A · Accountable
Technical PM
R · Responsible
Engineers
R · Responsible
Tax
I · Informed
Internal audit
I · Informed
Security
C · Consulted

Accuracy testing on real invoices

Finance director
I · Informed
AP manager (product owner)
A · Accountable
Solutions architect
R · Responsible
Technical PM
C · Consulted
Engineers
R · Responsible
Tax
C · Consulted
Internal audit
C · Consulted
Security
I · Informed

Go-live decision

Finance director
A · Accountable
AP manager (product owner)
R · Responsible
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
I · Informed
Tax
C · Consulted
Internal audit
C · Consulted
Security
C · Consulted

Run, monitor and improve

Finance director
I · Informed
AP manager (product owner)
A · Accountable
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
R · Responsible
Tax
C · Consulted
Internal audit
I · Informed
Security
C · Consulted

R ResponsibleA AccountableC ConsultedI Informed· not involved

Where I'd fit

Option A

Lead the architecture

If there's no architect on the programme, I'd own the design end to end: how the AI sits beside your finance system's matching and approvals, the API integration that doubles as your MTD digital link, the bank change controls and the gates. I'd work closely with your finance director and AP manager, and report to your programme board.

Option B

Support your architect

If your partner, your finance system supplier or your own team already has an architect, I'd take on the invoice reading, the exception agent and the integration under their lead, and give them a second senior opinion on controls, resilience and the evidence your auditors will ask for.

Where this goes wrong

  1. Goes wrong

    A fraudster's invoice carries new bank details, and the automated flow pays them.

    How the design avoids it

    Bank details on an invoice are never used to pay. Any difference from the supplier master stops the invoice, and only the master data team can change details, after a call-back and a second approval.

  2. Goes wrong

    The AI is given approval rights to hit a touchless target, and segregation of duties quietly disappears.

    How the design avoids it

    No approval, payment or master data permissions for the agent, enforced by the finance system. Touchless means matched and coded, not approved.

  3. Goes wrong

    The demo used clean PDFs. Real invoices are multi-page scans with credit notes mixed in.

    How the design avoids it

    Pilot on last month's real invoices from every channel, with field-level accuracy measured per supplier.

  4. Goes wrong

    Extracted data is copied into the finance system by hand, breaking the MTD digital link and adding errors.

    How the design avoids it

    Post through the finance system's API, keep the original file, and reconcile extracted totals to posted totals daily.

  5. Goes wrong

    Exceptions get faster, but invoices still wait weeks for a budget holder, so paid-on-time doesn't move.

    How the design avoids it

    Measure the whole cycle, chase approvers automatically, and report ageing by approver as well as by reason.

On the horizon

Changes already announced or under way that affect this design. More in the UK horizon scan.

  1. Late 2026–2027
    The Commercial Payments Bill: introduced in the Lords on 19 May 2026, it finished its Lords stages in October 2026 and is going through the Commons. It would cap payment terms at 60 days with limited exemptions, make interest on late payment at 8% above Bank of England base rate mandatory, give suppliers a fixed sum when a dispute is raised late or without enough information, and let the Small Business Commissioner investigate, adjudicate and fine persistent late payers. Detail will follow in secondary legislation after Royal Assent.

    Hold payment terms as data in the supplier master, raise disputes as soon as the AI finds a mismatch, and make sure the dispute date and reason are recorded, not just the hold.

  2. From 1 April 2029
    Mandatory B2B and B2G e-invoicing on a Peppol model (HMRC roadmap, 28 October 2026).

    Design intake so structured e-invoices skip document reading and go straight to the same VAT checks, matching and controls. Document AI stays for the long tail of paper and PDF. See the e-invoicing readiness playbook.

  3. November 2026 onwards
    Companies House identity verification: mandatory for new directors and people with significant control since 18 November 2025, with existing ones verifying at their company's next confirmation statement during a 12-month transition.

    When a new supplier is set up, check its Companies House record, the UK Sanctions List and its VAT number as standard, and record the checks against the supplier master.

Questions to ask your partner or vendor

Good answers are specific. Vague answers to any of these are worth following up.

Copy them into your next supplier meeting

  1. Can the AI change supplier bank details or release a payment in any way, and where is that blocked?
  2. What happens to invoices, and to suppliers' payment dates, when the AI or the link is down?
  3. How will we measure extraction and coding accuracy on our own invoices, not a supplier's benchmark?
  4. How does extracted data reach the finance system, and does that keep our MTD digital links intact?
  5. Who owns the coding policy, prompts and test sets after you leave?
  6. What does it cost to run per thousand invoices, at our volume?

Planning something like this?

Whether you need someone to lead the design or to support the architect you already have, let's talk it through.

Sam Naseem
Sam NaseemBirmingham, UK · UK & Europe
Available now