Inspiration
Freelancers get paid late or not at all; buyers paying strangers get scammed. The tools in between do not help: invoices enforce nothing, escrow services take custody and a fee, marketplaces take a cut and decide by policy. We wanted a payment bound to a definition of "done" that both sides agreed to, checked by a machine where a machine can check it, and held by PayPal rather than by us.
What it does
A seller writes the brief. Proofhold compiles it into an acceptance test: a short list of checks (file counts and formats, dimensions, dpi, deadlines, carrier tracking formats) plus the few judgement calls a human would make. The buyer reads the same test as a ruled sheet with both signatures and approves a PayPal authorization against it; the test's hash is written into the PayPal order as custom_id. The seller delivers through Proofhold. Deterministic validators decide what they can. An AI examiner judges only the lines a machine cannot measure, shows its reasons and confidence, and may abstain. A decision engine, not the model, captures in full, captures the agreed partial share, voids, or, after capture, files the evidence bundle with PayPal's dispute process.
Around that core: notifications and reminders to both sides at every state change, a printable record that doubles as the receipt, a ledger with search and CSV export, a hash-chained history either party can download, and a seal on every page that shows where the money is, one arc per line of the test, stamped when it moves.
How we built it
- Next.js 16 and TypeScript; one app for the seller workspace, the buyer page and the API. SQLite locally, Postgres hosted. 155 unit tests, four Playwright journeys, an axe accessibility scan over eleven routes in both colour schemes, all in CI.
- PayPal Orders v2 (
intent: AUTHORIZE), Payments v2 (capture, partial capture, reauthorize once after the honor period, void, refund), order tracking attached after capture, webhooks with signature verification plus reconciliation polling, and Disputes v1 (provide-evidence, and the sandbox-onlycreate,require-evidenceandadjudicate). A simulated PayPal client sits behind the same interface with the same state rules, so the app runs without credentials and says so on every page. - One structured-output interface with two providers behind it, Claude through the Anthropic SDK or Gemini through the Interactions API, for two prompts: the compiler (brief → test) and the examiner (evidence → verdict with abstention). Evidence is passed as data, never as instructions. Without a key, a starter test is read from the brief's plain facts, and a labelled simulated examiner observes and abstains so the judgement path can be seen without ever releasing money.
- Production layer: security headers, same-origin checks on every mutation, rate limits, structured redacted logs with request ids, a health check, terms and privacy pages, backup and restore scripts, a mail adapter (Resend, or a simulated outbox), and a printable record.
- Run for real: the PayPal sandbox authorized, captured, part-captured and voided through Proofhold, and Gemini compiled a brief and judged real uploads. Ids and screenshots are in the repository.
- Four review passes and a production-build recording found and fixed more than sixty defects, each listed with evidence in
docs/acceptance-matrix.md.
Challenges we ran into
- PayPal only accepts tracking against a capture, so delivery for goods is proven by the buyer's confirmation or silence, and the tracker is attached once money moves.
- Reauthorization is allowed once from day four to day 29; the scheduler reauthorizes exactly once after the honor period.
- Disputes exist only for captured transactions, so the product splits cleanly: before capture Proofhold decides, after capture PayPal decides and Proofhold supplies the evidence.
- A reviewer found that evidence could be changed under a live verdict. Evidence is now frozen once submitted; changing it is a "withdraw and resubmit" that cancels the verdicts and tells the buyer.
- The first version of the simulated examiner passed lines with a confidence figure, which could have released money by silence in a demo. It now only observes and abstains.
Accomplishments we are proud of
The decision engine is a pure function with tests for every path: release, partial release under an agreed rule, blocked by a failed or abstained line, review after objection. Abstention is a first-class outcome that never releases money. The buyer's word outranks the model on their own money. And the interface is its own: the Seal, the Sheet and the Rail read as one system in light and dark, and the printed record is a document a freelancer could attach to a dispute.
What we learned
Most of the product is in the authorization hold; the AI's job is to make the contract legible and to judge only what cannot be measured. Honesty about what is simulated reads better than a headline accuracy number, and an adversarial review of your own build is worth more than another feature.
What's next
Login with PayPal for sellers, templates from past tests, a verified-human fallback for abstentions, and a conversation with PayPal about running conditional release in production.
Built with
Next.js, React, TypeScript, Node.js, SQLite, PostgreSQL, PayPal REST APIs (Orders v2, Payments v2, Order Tracking, Webhooks, Disputes v1), Anthropic Claude or Google Gemini (structured outputs), Resend, Playwright, axe, Render.
Built With
- google-gemini
- next.js
- node.js
- paypal-disputes
- paypal-orders-v2
- paypal-payments-v2
- paypal-webhooks
- playwright
- postgresql
- react
- render
- sqlite
- typescript