Inspiration

Freelancers and small clients in India don't trust each other. Clients are afraid to pay upfront, freelancers are afraid of not getting paid, and terms agreed loosely over chat often end in "that's not what we agreed." Escrow platforms are expensive, and someone still has to decide manually whether the work was actually delivered. We wanted to see if AI and PayPal together could handle the whole deal, from negotiation to payout, fairly and automatically.

What it does

ProofPay is milestone escrow on PayPal, with AI handling the negotiation and the work review.

  1. Negotiate. The freelancer's AI agent bargains with the client on price, scope and deadline. It can never go below the freelancer's private floor price, because that limit is enforced in code and not just in the prompt.
  2. Contract. Gemini turns the agreed terms into milestones, each with clear acceptance criteria that can actually be checked.
  3. Escrow. The client funds each milestone. PayPal authorizes and holds the money, so nobody is charged yet.
  4. Verify. The freelancer submits a GitHub repo, a live URL or text. Gemini checks each criterion against the real evidence, like the file tree, the source code and the live page.
  5. Release. If every criterion passes, PayPal captures the payment and the freelancer gets paid. If not, the AI explains what's missing and the money stays on hold. If the deal is cancelled, the hold is voided.

Prices are shown in rupees. PayPal doesn't settle INR between Indian accounts, so orders are charged in USD at a configurable rate.

How we built it

  • Next.js 15 with the App Router, TypeScript and Tailwind CSS for both the frontend and the API
  • PayPal Orders v2 with the AUTHORIZE intent, using authorize, capture and void, plus the PayPal JS SDK for checkout and verified webhooks
  • Google Gemini in JSON mode, with zod validation, a retry, and a rule-based fallback so the app keeps working if the model is slow
  • Neon Postgres for the database and AG Grid for the payments dashboard
  • Deployed on Render
  • As mentioned in rules, we have used claude as our AI assistant

Challenges we ran into

  • PayPal doesn't support domestic INR payments in India, so we show prices in rupees and settle in USD.
  • Letting an AI make decisions about money safely. Every criterion has to pass, the server fetches the evidence itself, and the AI is told to ignore any instructions hidden inside a submission.
  • Keeping the negotiating agent honest. The floor price is checked in code even if a client tries to talk the agent into a lower price.
  • Sandbox quirks, like the seller account not being able to pay itself and authorizations expiring after about 29 days.

Accomplishments that we're proud of

  • The full loop works on real PayPal sandbox payments: negotiate, sign, hold, verify and release.
  • Every AI decision comes with a reason that both the client and the freelancer can read.
  • A clean dashboard and a live deployment that anyone can try.

What we learned

  • Authorize and capture is a natural fit for escrow.
  • When money is involved, limits in the prompt are not enough. The hard rules have to live in code.
  • Asking the model for structured JSON and validating it makes AI reliable enough for a real workflow.

What's next for ProofPay

  • Handling disputes with AI mediation using the PayPal Disputes API
  • Tips and bonuses through the Payouts API
  • Re-authorizing holds for longer milestones
  • Real user accounts and more than one

Built With

Share this project:

Updates

Submission history