Inspiration
Every freelancer has a story about the client who said "just one more small change" fourteen times and then never paid. And every client has a story about paying up front for a website that never really worked.
Escrow should fix this, but it doesn't for small jobs. Someone still has to decide whether the work is done, and that's slow, expensive and subjective. So nobody uses escrow for a $300 bakery website or an $80 paint job.
We asked: what if "done" wasn't an opinion? What if it was a checklist both sides agree on, PayPal held the money, and an AI checked the work before anyone got paid?
What it does
Verifund is AI escrow on PayPal: pay for proof, not promises.
- Agree on "done". The client describes the job in plain words. AI turns it into milestones with a concrete checklist, flags vague items like "looks nice", and adds a quality baseline to every website: secure https, no placeholder text, no broken links or images, works on phones.
- "Did you forget anything?" Before paying, the AI lists what clients usually assume is included: the contact form actually reaching their inbox, opening hours, a custom domain. The client ticks what they want; everything else is written down as not included, so nobody argues about it later. The client can also add customer journeys ("a customer can book a table for 4 on Friday") and handover items (admin login, domain, repository).
- Approve the design first. For visual work, the first milestone is a design mockup the client approves, with an agreed number of change rounds, so taste is settled before anything is built.
- Fund it. The client pays with PayPal, Pay Later or Venmo. It's a PayPal authorization: the money is held, not taken.
- Build, without surprises. The freelancer can run preview checks on work in progress and both sides see "4 of 7 done", with no money moving. New requests mid-job go to "Included, or new work?": the AI compares them with the agreement. If it's already on the checklist, the freelancer does it; if it's new, it becomes a paid milestone the freelancer can accept or decline.
- AI checks the work. A real cloud browser (KERNEL) crawls the site and measures facts with code: pages, broken links, exact emails, phone layout, https, the domain. Then the AI uses the browser like a person: it opens pages, clicks, fills in fields, submits the contact form, and completes each customer journey end to end. Every checklist item gets pass, fail or unsure, with evidence, screenshots and a recording you can replay.
- The client confirms and pays. The AI's test message carries a code (like
VF-7Q2K), and the client confirms it actually reached their inbox. They confirm the handover too. Then they approve, or let the review window end and PayPal pays automatically. - Disagree? The AI Judge decides. A client dispute must name the checklist item that isn't met. The AI Judge weighs the checklist, the evidence, what was agreed as not included, and both sides, and proposes a split such as 75/25. Code turns that into a PayPal partial capture. Either side can escalate to a human.
- Warranty. For a live website, 25% stays held at PayPal for a week after approval while Verifund reloads every page daily. If the site keeps working, it's paid automatically. If a page breaks and isn't fixed in time, that part goes back to the client. Only the daily check can hold it back, never the client.
The AI never touches money. It only produces verdicts and a 0–100 share, which code validates before any PayPal call.
How we built it
- Next.js 16 + React 19 (App Router, server actions), TypeScript, Tailwind CSS 4
- PayPal: Orders with
intent=AUTHORIZE; full and partial captures, including a 75% capture withfinal_capture: falsethat keeps the 25% warranty authorized; voids; JS SDK buttons (PayPal, Pay Later, Venmo); signature-verified webhooks; the Disputes API; and Log in with PayPal - Google Gemini (two Flash Lite models with automatic fallback) for the browsing agent with tool calls and screenshots, photo comparison, the GitHub repo checker and the Insights chat
- Mistral (ministral-14b, then ministral-8b) for the text tasks: job planning, checklist checks, "did you forget anything?", "included or new work?" and the AI Judge. Each provider is the other's backup.
- KERNEL cloud Chromium driven with Playwright over CDP, with MP4 session replays
- AG Studio for the Insights dashboard, with an "ask your data" AI assistant
- Supabase Postgres with Drizzle ORM and row-level security, hosted on Azure App Service
- 210 Vitest tests, many against a real Postgres, plus a full end-to-end run through the real app with PayPal sandbox payments, real AI checks and a warranty release
Every milestone change is a conditional database update (UPDATE … WHERE state = <from>) and every PayPal call carries an idempotent request id, so a payment can never happen twice, even when "Approve now" races the automatic release.
Challenges we ran into
- Trusting AI with money. We decided early that it shouldn't be. The AI only proposes; code validates every verdict and share, website text and dispute statements are treated as untrusted data, and a funded hold never moves without a passing verdict or a decision.
- "I thought that was included." Most disputes start before any work does: the client assumed something obvious and never wrote it down. Checking the work better couldn't fix that, so we added the expectation finder and the "not included" list, which settle it before anyone pays.
- Checking modern websites. A static crawler sees nothing on a React app. We built a hard demo site (a Next.js travel app with client-side routing, data loaded in the browser, a 3-step booking wizard and a cookie bar) and kept improving the agent until it could handle it, then gave it a tool to fill in fields so it can complete whole customer journeys.
- "Someone else's website." Freelancers prove they own the site they submit with a per-freelancer code in a meta tag or a
.well-knownfile, checked by code. - Subjective disputes. "I don't like the colours" isn't something an AI can fairly judge. That's why we added the design-approval milestone, limited change rounds, and the rule that disputes must point to a checklist item.
- Free AI quotas. A single website check can make up to 20 AI calls. We added a rate limiter with fallback between two Gemini models, then moved the text tasks to Mistral so Gemini's quota is kept for the browsing agent.
- Time limits on held money. PayPal guarantees an authorization for 3 days and keeps it for 29. The review window, disputes and the warranty all had to fit inside that, and we tested the 75% / 25% split on the sandbox before building on it.
Accomplishments that we're proud of
- An AI agent that completes customer journeys, like booking an appointment and checking the confirmation, before anyone gets paid
- "Did you forget anything?", which settles the most common dispute before it can happen
- A 25% warranty that stays with PayPal and is released automatically if the site keeps working
- Disputes that end in a fair partial capture in seconds, instead of all-or-nothing
- A one-click demo: every visitor gets a private client and freelancer workspace, switches sides with one button, and uses the PayPal sandbox end to end
- A printable Proof Report with per-item evidence, screenshots and a replay of the check
What we learned
- The hard part of escrow isn't holding money, it's agreeing on what "done" means. Most of the value comes from turning a vague request into a checkable list before anyone pays, including what's not included.
- Agents need fences: restricting the browsing agent to the submitted site, capping its steps, and measuring facts with code made its verdicts far more reliable than letting the model look around freely.
- Fairness has to work both ways. Every protection for the client (warranty, inbox check, handover) has a matching protection for the freelancer: only code can hold the warranty, disputes must cite the checklist, and extras become paid work.
- PayPal's authorize → capture → partial capture flow maps very naturally onto escrow, warranty included.
What's next for Verifund
- More proof types: mobile apps, documents and video deliverables
- Longer-running holds for bigger projects using PayPal's reauthorization
- Daily warranty checks that also re-run customer journeys, not just page loads
- Reputation built from verified, paid milestones instead of star ratings
Verifund runs on the PayPal sandbox for the PayPal AI Hackathon. No real money moves; everything else, including the AI checks, is real.
Built With
- ag-grid
- ag-studio
- auth.js
- azure
- azure-app-service
- drizzle-orm
- github
- github-actions
- google-gemini
- kernel
- mistral
- motion
- next.js
- node.js
- paypal
- paypal-js-sdk
- paypal-rest-api
- playwright
- postgresql
- react
- supabase
- tailwind-css
- typescript
- venmo
- vitest