Open Banking · Fintech

AI Invoice Parsing & Open Banking Payment Platform

UK financial services business  ·  2025

Zero-keying invoice payment: AI extracts sort code, account number, amount, and reference from uploaded PDFs

UK financial services business project screenshot

Background

Finance teams were manually re-keying payment details from PDF invoices into their banking portal, creating errors and delays. Every invoice meant someone reading amounts, sort codes, and account numbers off a PDF and typing them into a banking portal by hand, a process that scales badly and fails quietly: a single transposed digit sends money to the wrong account. The client wanted to eliminate this step entirely by combining AI invoice parsing with Open Banking payment initiation, so a payment could go from PDF to bank confirmation without a human touching a keyboard in between.

What We Built

A Next.js application with two API routes and a multi-step UI flow, designed so a finance user never has to manually transcribe a number:

Upload
user uploads a PDF invoice
Parse
/api/parse-invoice extracts payment details (amount in GBP, original currency, beneficiary name, sort code, account number, reference) using an AI extraction service
Review
user confirms the extracted payment details and invoice preview side-by-side
Bank selection
user selects their bank (Barclays integrated)
OAuth consent
Open Banking authorisation flow with the selected bank
Payment initiation
payment submitted via PSD2 PISP
Confirmation
transaction reference and payment timestamp returned

Architecture

Next.js App Router with server-side API routes. The parse-invoice endpoint handles PDF extraction and AI field parsing, isolated from the payment flow so either side can change independently. The mock-payment endpoint drives the Open Banking PISP flow. A PaymentDetails type enforces the data contract between parse and payment stages, so a field the parser produces can never silently go missing by the time it reaches the bank. PDF preview is rendered client-side via dynamic import, keeping the initial bundle light.

Results

Before

Payment details manually re-keyed from a PDF into the banking portal

After

AI extracts every field automatically; a human only reviews and confirms

Before

A separate manual bank transfer step after the invoice was processed

After

Payment initiated directly via Open Banking, no portal hand-off

Outcomes & Lessons Learned

  • Zero-keying invoice payment: AI extracts sort code, account number, amount, and reference from uploaded PDFs
  • Open Banking payment initiation via Barclays, removing the need for manual bank transfers
  • Multi-currency support with GBP conversion and original amount tracking
  • Full payment confirmation with transaction reference number and timestamp

Handling invoice references correctly (normalising INV- prefixes, falling back to timestamp-based references when filename is unavailable) was important for bank reconciliation downstream. Building this normalisation into a dedicated buildPaymentReference utility kept the logic consistent across parse and confirmation stages, instead of re-implementing the same edge cases in two places.

FAQs

Questions, answered.

The things people ask us about this project. If yours isn't here, ask us directly, we reply like humans.

Ask us anything→

How does the platform extract payment details from an invoice?

An AI extraction service reads the uploaded PDF and pulls out the amount in GBP, original currency, beneficiary name, sort code, account number, and reference, which the user then reviews side-by-side with the invoice before anything is submitted.

Does a human ever review the extracted data before payment?

Yes, the flow includes a review step where the user confirms the extracted payment details against the invoice preview before selecting a bank and proceeding to Open Banking authorisation.

How is the payment actually sent to the bank?

Through a PSD2 Payment Initiation Service Provider (PISP) flow with Barclays: after OAuth consent, the payment is submitted directly via Open Banking rather than a manual bank transfer.

What happens with invoices in a currency other than GBP?

The system supports multi-currency invoices, converting to GBP for payment while still tracking the original invoice amount and currency.

How are payment references generated when an invoice doesn't have one?

A dedicated buildPaymentReference utility normalises references, including handling INV- prefixes, and falls back to a timestamp-based reference when the filename doesn't provide one, keeping reconciliation consistent on the bank's side.

Let's make things happen

Ready to craft tomorrow, today?

Where innovation meets execution, and ideas evolve into impactful solutions. Book a free consultation, no strings attached.