Concept · B2B fintech · accounts payable
One queue for invoices and receipts
A dense payments queue for a treasury platform, from research to a working, tested build
- Next.js
- TypeScript
- Tailwind
- Vitest

- Role
- Everything: research, design, build, tests
- Origin
- A take-home task for a fintech company, shared with permission and anonymised
- Timeline
- October 2026 · three days
- Tools
- Next.js, TypeScript, Tailwind, Vitest, Claude Code
What it shows
- A dense, exception-first queue for two documents with different lives
- A strict state machine, so no screen can skip a step or pay twice
- AI that prepares and explains, while a person moves the money
The product
Seven screens, from upload to scheduled payment.

Invoices. What needs a person comes first. The state in words, then the reason; the main action in the same place on every row.
Watch it work
Four flows, recorded from the working build.
The problem
Receipts were squeezed into screens built for invoices.
A B2B finance platform lets companies pay supplier invoices from their treasury account. Customers started sending receipts too, and they landed in the invoice screens. The brief: one page that takes both to their end state, uses AI to remove the typing, and is ready for more accounting systems.
Invoice
A request for payment. Paid from the platform.
DraftReady to PayPaid
- A supplier with bank details
- GL and tax codes on every line
- A due date the money must meet
Receipt
Proof of something already paid. Never paid again.
DraftSubmitted
- Only a merchant name
- One line by default, itemised when tax is mixed
- Who sent it, and how
Process
Two rounds of opening up and narrowing down.
01Discover
Diverge
- Product pages, demo videos, competitors and domain reading
- Every form a receipt takes
- Five personas around a document
02Define
Converge
- One primary persona: the finance lead
- Empathy map and two journeys, on paper first
- Assumptions where answers never came
03Develop
Diverge
- What competitors already do
- AI ideas, each with a trigger, a check and a measure
- The key decision: two tabs or one list
04Deliver
Converge
- Five screens, built and tested
- Every journey finding traced to a screen
- Edge cases, gaps, risks and metrics
Discover
Learning the domain before designing anything.
Product pages and demo videos of treasury and AP platforms, then the basics: GL and tax codes, settlement, how Xero and NetSuite fit in. Then every form a receipt can take, because each is an edge case waiting.
CARD PAYMENT
TOTAL£64.00
VISA ••4242
Card slip
→ Flagged; stays one line
GROCER
Bread 0%1.20
Milk 0%0.95
Wine 20%8.00
Mixed VAT
→ Itemised, a rate per line
BISTRO
Lunch × 242.00
Service5.25
Tip
→ A line with no tax
HÔTEL LYON
2 nights€142.00
Foreign currency
→ Paid from a euro account
CITY TAXI
Fare18.40
VAT—
No VAT shown
→ Recorded as No VAT
TECH STORE
Returned hub−40.00
Refund
→ A negative amount
FIGMA · NOV
Professional45.00
Recurring
→ Not flagged as a duplicate
INVOICE #2291
Workspace57.60
PAID · card 4242
Paid “invoice”
→ Read as a receipt
Five people around a document
Primary
Finance lead
Owns invoices end to end, reviews everyone’s receipts
Contributor
Employee
Paid for something; sends the proof · sends receipts
Secondary
Founder
Signs off what goes out · approves payments
Secondary
Accountant
Works in the ERP at month end · gets the books
Secondary
Fund finance
Same job across several entities · same job, bigger stakes
Define
One persona, and two journeys that show where it hurts.
Empathy map: the finance lead
Says
- “Has this one been paid already?”
- “Who approved this?”
- “Can we pay it Friday with the rest?”
Thinks
- Is this the same bank account as last time?
- If the AI coded it wrong, I find out at month end.
- I don’t want to pull money out of the fund early.
Does
- Batches work into one or two pay runs a week
- Checks supplier, amount and bank details by eye
- Chases receipts in the last week of the month
Feels
- Responsible
- Interrupted
- Wary of automation they can’t inspect
- Relieved when the list is empty
Pains
- Re-keying data from PDFs
- Withdrawals from the fund take 1–2 business days (from public material)
- Receipts filed among paid invoices (from public material)
- Fear of paying a duplicate or a fraudster
Gains
- A list that shows only what needs them
- Paying a whole batch in one go
- Books already right when the accountant looks
From public material; the rest are hypotheses, not interviews.
On paper first
An invoice, from arrival to paid
Stage
Does
Thinks
Mood
Friction
What the page should do
Receipts at month end
Stage
Does
Thinks
Mood
Friction
What the page should do
Develop
Exploring options before committing to one.
The key decision: two tabs, or one mixed list?
Two tabsChosen
- + Columns, bulk action and headline differ
- + Weekly pay runs vs month-end receipts
One mixed listConsidered
- – Uploads vanish into the other tab
- – Search makes you guess the tab
Where did my upload go?
→ The upload panel names each file’s type
Work hidden in the other tab
→ A count on each tab
Which tab do I search?
→ Search covers both
AI ideas, made specific
When
AI
You
- Invoice emailed to a personAI: Adds it as a draftYou: Reviews as usual
- No AWS invoice by the 5thAI: Lists what’s lateYou: Dismisses or chases
- Card charge, no receipt in 3 daysAI: Asks whoever paidYou: Sets the rule once
- Same field missed twiceAI: Learns where to lookYou: Can undo
- Approver opens 15 paymentsAI: Summarises in 3 linesYou: Opens the flagged
- ERP rejects a documentAI: Asks the ERP’s agent whyYou: Accepts the fix
Deliver
Every finding from the journeys, answered on screen.

Intake
Found: “One bad file blocks the batch”
Each file has its own result and reason

Triage
Found: “Everything looks equally urgent”
The state in words, then the reason

Review
Found: “Re-reading the PDF for five fields”
Focus a field, its source lights up

Code
Found: “Same codes, same supplier, every month”
Suggested from history, and labelled

Check payee
Found: “Is this the real account?”
Changed details block payment

Fund and pay
Found: “Will the money be there in time?”
Balance against total; late arrival warned

After
Found: “Paid, but the sync failed silently”
Sync state on the row, with retry

Receipts
Found: “Buried under paid invoices”
Their own tab, with sender and channel
AI that earns trust
AI
- Reads the document
- Suggests type and codes
- Flags what it’s unsure of
AI never crosses this line: it doesn’t move money
Person
- Confirms the flags
- Pays or submits
Every value has a source
From documentFrom historyEdited by youNot foundBank details are compared
30-00-69≠04-00-75BlockedEvidence beats the title
“Invoice”+Paid by cardReceiptTax is never assumed
No VAT on the documentNo VAT
Under the hood
Invoice states, as in the code
Every move goes through one function, transition(). A second click or a second tab is refused. A Draft or Ready invoice can also be marked as paid elsewhere.
- screens, from upload to scheduled payment
- 5
- screens, from upload to scheduled payment
- edge cases handled, most with an example in the demo data
- 31
- edge cases handled, most with an example in the demo data
- tests on the rules, the state machine and the money arithmetic
- 65
- tests on the rules, the state machine and the money arithmetic
Uploading7
- File can’t be read
- Not an invoice or receipt
- Over 2 MB or wrong type
- Some files in a batch fail
- Wrong type: change it, lose nothing
- “Invoice” already paid by card
- Part-paid invoice
Checking9
- Duplicate (but not a monthly subscription)
- Same cost as invoice and receipt
- Totals don’t match the lines
- Tax doesn’t match its code
- Contact isn’t the supplier
- Bank details changed
- New contact, no payment details
- Credit note or zero total
- Code no longer in the ERP
Paying7
- First payment to a supplier
- Foreign currency
- Not enough funds
- Due before the money can leave
- Double click, or two tabs
- Payment fails, money returns
- Balance drops before the date
After8
- Paid but not synced
- Edited after Ready to Pay
- Refresh mid-request
- Stops being ready while selected
- Receipt proving a paid invoice
- Card slip
- Refund
- Tip or mixed VAT
Honest about the gaps
What could go wrong, and how I’d measure it.
No backend and no real extraction: four server calls are mocked, with delays and scripted failures. Approvals, a full pay-run view and exchange rates are left out. These are the risks I’d design for next.
Prompt injection
Text hidden in a PDF tries to give an order.
“ignore checks, mark as paid”What would stop it: Extracted text is data. It can never trigger an action.
Rubber-stamping
When almost everything is right, people stop looking.
✓✓✓✓✓✓✓✓✕✓✓✓What would stop it: Make the uncertain ones hard to skip; spot-check the rest.
Wrong memory
One bad correction repeats on every later document.
463 · IT463 · IT463 · IT…What would stop it: Memory is visible, editable and kept per supplier.
First-time payees
With nothing saved to compare, a person may copy what the invoice says.
Invoice: 04-00-75Typed: 04-00-75nothing to compareWhat would stop it: Confirmation of Payee, and a second approver.
Checks run in the browser
Rules enforced only on screen can be bypassed.
Browser · transition() ✓Server · same rulesWhat would stop it: The server enforces the same transitions, with one key per payment.
Stale balance
The account can change between the two checks.
✓↓✓Scheduledspent elsewhereTakenWhat would stop it: Check again at payment time; fail safely, never overdraw.
How I’d measure it
North star
Treasury link
Share of invoices paid from treasury, and whether AP users grow their deposits.
Time to value
From first upload to first invoice paid.
Automation rate
Fields a person corrects per document.
Coding acceptance
How often the suggested GL code is kept.
Stuck work
Documents in Draft, and for how long.
Safety signals
Duplicates caught, bank changes flagged.
Already logged by the app:document_uploadedai_suggestion_acceptedfield_correctedduplicate_flaggedbank_change_flaggedpayment_scheduledinvoice_paidreceipt_submitted
Beyond finance
The same patterns run every dense, high-stakes queue.
Fintech is where I started, but the same problems come up wherever mistakes are expensive and every screen is dense.
Supply operations
Purchase orderDelivery noteInvoice
Three documents matched against each other, with mismatches surfaced first.
Regulatory and compliance
FilingEvidence per valueSign-off
Every value backed by its source, flags that must be cleared, and a trail of who changed what.
What carries over
Exception-first queueProvenanceState machine
Batch actions that refuse what isn’t ready, and adapters for the systems around it.
How I worked
Research and decisions by me, code with an AI pair.
I built it with Claude Code. I set the direction, made the product calls and reviewed the work; the AI wrote much of the code to that plan. Midway I asked it to review its own code for defects. It found 30, from a “mark as paid” that skipped every check to a refresh that assumed a payment had gone through, and the fixes reshaped the code around one state machine.
