arrows / space to advance · F fullscreen · N notes

PayPal AI Hackathon · AI + real PayPal sandbox

Should this invoice
really get paid?

Durin reads the evidence with AI, verifies it with a deterministic engine against real PayPal activity, and leaves the authorization to the merchant.

Duringithub.com/annatchijova/durin

A Tuesday night, any small business

Three inboxes.
One PayPal history.
One spreadsheet.

Invoices arrive by email

PDFs, forwarded threads, a photo of a paper invoice from a supplier's phone.

Terms live in contracts

Due dates, currencies, discounts, who exactly gets paid and where.

Money moves in PayPal

Payouts, fees, refunds, pending items: the only record of what actually happened.

Durin02 · the situation

The real problem

The hard part is not the Pay button.
It is knowing whether the obligation, the PayPal operation and the money actually match.

Is this invoice new, duplicated, or already paid? Does the recipient match our records? Is the amount within policy? What needs a human before any payout?

Durin03 · the problem

What goes wrong today

Paid twice

The same invoice forwarded from two mailboxes, two weeks apart. Both looked new.

Wrong recipient

"We changed our payment email." One line in a thread, and the money goes somewhere new.

Six months ago

"You still owe us for March." Scrolling hundreds of PayPal rows by amount and date, hoping to recognize one.

Every one of these is a reading problem first and a money problem second. That is exactly where AI helps, and exactly where it must not decide.

Durin04 · the cost

Durin, in one sentence

AI does the reading.
A deterministic engine does the verifying.
You do the authorizing.

Durin lets a merchant pay suppliers from their invoices, with every extracted fact cited to its source, every check reproducible, and every payout signed by a person before PayPal ever hears about it.

Durin05 · the mechanism

One journey per batch of invoices

Six steps. One of them is yours.

source1

Evidence received

Every source hashed. Nothing enters without a fingerprint.

AI2

Data extracted

Supplier, amount, recipient, due date, each with its literal excerpt.

engine3

Contradictions

Two sources disagree on a field? Both are shown. Nobody picks silently.

engine4

Proposal sealed

Only ready rows, totals as strings, one SHA-256 digest.

you5

Human approval

Signed against that digest. Change a cent and the signature breaks.

PayPal6

Result at PayPal

Real Payouts batch, item by item, refreshed from the provider.

Durin06 · the journey

Step 2 · what the AI read

No citation, no acceptance.

supplierGlobex Supplies"Supplier: Globex Supplies"cited
amount42.50 USD"Amount: 42.50 USD"cited
recipientsupplier@example.com"Recipient: supplier@example.com"cited
due date2026-12-20(no literal excerpt in the source)needs review

The model fills a strict schema and must quote the exact text behind every value. A value it cannot quote is flagged for a person, not accepted.

Durin07 · provenance

Step 3 · what the engine verified

Deterministic, not guessed.

Same input, same output, every time. No float in the decision path; every total is a string the engine produced.

Durin08 · verification

Every invoice ends in one of three places

Ready

Every field cited, nothing contradicts, policy holds. It still waits for your signed approval.

Excluded

A contradiction, a duplicate, an unapproved recipient, an amount over the limit. It never enters a proposal.

Review

A value without a literal excerpt, or a source the AI could not read. Nothing is decided by default.

An exception always reads as an exception, whichever check produced it. Exceptions are never mixed into what is reconciled.

Durin09 · three answers

Steps 5 and 6 · what you authorized

Sealed, signed, then PayPal.

SHA-256
The proposal is canonicalized and sealed before any approval. The digest is what you sign.
HMAC
Your approval is a keyed signature over that exact digest, with an expiry. It cannot be reused for another batch.
Payouts API
Only then does Durin build a PayPal Payouts batch, idempotent on the digest, and reconcile item by item from PayPal's own response.

PayPal stays the source of truth for what happened to the money. Durin never claims a payment it did not read back from the provider.

Durin10 · authorization

And the question every merchant gets

"Did we pay Acme around $450
a few months ago?"

AI

Interprets

Turns the question into search hints: months back, counterparty, amount, keywords.

→
PayPal

Transaction Search

Real history, queried in PayPal's own date windows, filtered by deterministic matching.

→
AI

Narrates

Explains only what was found. An empty result is an honest "nothing matched".

No more scrolling hundreds of rows by hand. The model proposes what to search for, never the answer itself.

Durin11 · transaction chat

The architecture, in one line

AI on both ends.
Never inside.

OpenAI

Extracts

Structured output with evidence excerpts, validated against the source text.

→
deterministic core

Decides & seals

Checks, contradictions, proposal digest, signed authorization. Pure Python, reproducible, tested.

→
PayPal

Executes

Payouts and Transaction Search, sandbox today, same code path for live.

→
OpenAI

Explains

Puts a sealed result into words. Cannot change a value that is already fixed.

Swap the model and only the wording changes. The verdict, the seal and the chain of custody stay identical. That is the test the design is built to pass.

Durin12 · architecture

Built on

PayPal Developer Platform

Payouts API for supplier payments, built only from a signed proposal. Transaction Search API behind the chat, chunked into PayPal's 31-day windows. Sandbox merchant and personal accounts, exercised end to end.

OpenAI

Structured extraction with mandatory evidence excerpts, and query interpretation plus narration for the chat. Always a proposal, never a decision.

Deterministic engine

Python, standard library at the core: canonical serialization, SHA-256 seals, HMAC authorization, a durable authorization ledger, MCP tools for the agent, and a test suite for every module.

The merchant's view

Next.js frontend that never holds a credential: one journey per batch, decision summary with exactly one next step, CSV and PDF export, English and Spanish.

Durin13 · stack

Proof, not promise

A real sandbox payout, reconciled.

42.50 USD
Extracted from a real invoice by the model, cited field by field, verified by the engine, approved by a person.
BUGEK4RVLGAKN
PayPal Payouts batch id returned by the sandbox, read back and reconciled item by item.
3 of 3
Outcomes shown in the demo: one reconciled case, one case excluded for a recipient change and a limit, one source the model could not read, reported as such.

Everything in the video runs live on the real pipeline. The hosted demo is an unedited recording of those same runs.

Durin14 · evidence

The Doors of Durin open only for the right word

The right word
is yours.

AI that reads everything, an engine that forgets nothing, and a merchant who signs every payment knowing exactly why.

Durin15 · thank you