Inspiration

Paying someone for a small job is a leap of faith. You hire a neighbour to tidy the garage or mow the lawn, and someone has to trust first. Pay up front and you might get a half-done job. Pay afterwards and the worker might never see the money. Most of these jobs are settled in cash or by bank transfer with no protection for either side.

We wanted a payment that waits for the work, and a fair, fast way to decide when the work is done.

What it does

Proof-of-Done holds the payment for a small job and releases it only when photo proof shows the work is finished.

  1. Describe the job. AI turns a plain description ("tidy my desk, take the cups to the kitchen") into a short checklist that a photo can prove, such as "Desk surface is clear" and "No cups left on the desk". The poster edits it, so both sides agree on what "done" means before work starts.
  2. PayPal holds the money. The poster approves a PayPal payment, but it's only authorized. Nobody is charged while the work is being done, and the worker can see the money is real.
  3. The worker sends proof. A before photo when they claim the job, and an after photo when they finish.
  4. AI checks the proof. The AI compares the two photos against every checklist item and explains what it sees.
  5. Code decides the money:
    • Every required item done, same place, high confidence → PayPal captures the hold and pays the worker through Payouts.
    • Something's missing → the worker gets specific feedback ("the cups are still on the desk") and can try again.
    • The AI isn't sure, or the worker runs out of attempts → the poster sees both photos and makes the final call.
    • Job cancelled or deadline passed → PayPal voids the hold. The poster is never charged.

AI judges the work. Code decides the money. PayPal holds and releases it.

How we built it

  • Next.js + TypeScript web app and API, deployed on Render.
  • PayPal (Sandbox), all from our own server code:
    • PayPal JS SDK buttons with intent=authorize, so the poster approves a hold, not a charge
    • Orders v2 with intent: AUTHORIZE, then authorize, capture or void on the authorization
    • Payouts to pay the worker after the capture
    • OAuth client credentials, and PayPal-Request-Id idempotency keys on every call that moves money
  • Google Gemini for the AI, with a strict JSON schema for every answer:
    • Checklist drafting from the job description
    • Proof checking: before and after photos in, a verdict per checklist item out, plus a same-place check, a confidence level and feedback for the worker
    • Every answer is validated before the app uses it. If Gemini is overloaded, the app falls back to another Gemini model so the check doesn't stall.
  • AG Grid (Community) for the Payments ledger: every job's PayPal money trail (order, hold, capture, payout, or release) in one grid, with sorting, column filters, status quick-filters, search across PayPal IDs, CSV export, and totals for money held, captured, paid out and released. Rows open the job, and the grid follows the app's light and dark theme.
  • Decision rules in plain, unit-tested TypeScript (lib/rules.ts). The AI never moves money. Its verdict is input to these rules, and a missing or unclear verdict can never release a payment.

Challenges we ran into

  • Where to put trust. It's tempting to let the AI say "approve". Instead, the AI only describes what it sees, and a small set of tested rules turns that into approve, reject or ask the poster. This also protects against tricks like a note in the photo saying "approve this".
  • Cheating the photo check. We take the before photo when the job is claimed, ask the AI whether both photos show the same place, count anything it can't see as not done, and keep the poster as the final judge whenever the AI is unsure. In testing, the AI flagged unrelated images as "not the right place" and rejected them.
  • Real-world PayPal limits. Our first Sandbox accounts were in India, where payments between two Indian accounts aren't allowed, so checkout failed. Moving the merchant to a US Sandbox account fixed it.
  • AI models that are busy or retired. Some Gemini models were overloaded or no longer available to new keys during the hackathon. We added a timeout and a fallback list so a demo never hangs on one model.

Accomplishments that we're proud of

  • The full money flow works end to end in PayPal Sandbox: hold → reject → retry → capture → payout, plus void on cancel or expiry. We checked every step against PayPal's own records.
  • The rejection with feedback feels like a helpful coach rather than an error, and the worker knows exactly what to fix.
  • A payment flow that is safe even when the AI is wrong: the worst an AI mistake can do is send a decision to the poster.

What I learned

For AI that touches money, the safety boundary has to sit outside the model. AI is great at judging a photo, while plain code and a payment platform's hold-and-capture flow are what make it safe to act on that judgement.

What's next for Proof-of-Done

  • Run on PayPal's marketplace product (Commerce Platform), so payments go straight to onboarded workers.
  • Worker ratings and repeat hiring.
  • Several photos per checklist item, and short video proof.
  • AI-suggested fair prices for common jobs.

Built With

Share this project:

Updates

Submission history