Inspiration
Clients hate paying upfront for work that misses the brief, and freelancers hate delivering good work and chasing invoices. Instead of slow human escrow disputes, what if PayPal held the money and an AI agent verified the finished work against the client's checklist—automatically capturing and paying out when it passes, or returning the hold when it doesn't?
We also applied the exact same "pay only when verified" engine to a second vertical: Trading Agents, where buyers can re-run any strategy's backtest proof hash in one click and hold payment in PayPal during a live paper-trading trial.
What it does
1. Parable Deals — Pay when the work passes
- Turn any brief into an agent checklist: Paste a job brief, price in USD, and the freelancer's PayPal email. AI generates 2–8 concrete checks (
AI check,Min words,Must include) that you can edit before locking funds. - Hold money with PayPal (
AUTHORIZE): Fund the deal through PayPal Orders v2 withAUTHORIZEintent. PayPal holds the funds in the middle (HELD $Xon the liveMoneyFlowvisualizer) without capturing upfront. - Live verification & settlement: The freelancer opens a private tokenized link (
/#deal/<id>.<token>) and submits their work (up to 3 attempts). Hard-coded rules (min_words,must_include) cannot be bypassed by prompt injection, while Gemini evaluates qualitative items with quoted evidence. Pass all checks → Parable captures the PayPal authorization and pays out the freelancer (capture_authorization+create_payout). Cancel → Parable callsvoid_authorizationand returns the hold. - SHA-256 hash-chained ledger: Every step writes a hash-chained public receipt without leaking private briefs, deliverables, emails, or PayPal IDs.
2. Trading Agents — Pay only when the proof passes
- Build algorithmic paper-trading strategies from plain English using Gemini, Claude, OpenAI, or Gemma via a safe AST formula language (never
eval). - Benchmark multiple AI models side by side on identical historical candles, check overfit warnings (70/30 split), inspect live tracks, let buyers Re-run the proof deterministically, or buy in "Pay if proven" PayPal trial hold mode.
How we built it
- PayPal Developer Platform: Orders v2 (
intent="AUTHORIZE"andCAPTURE), Authorizations v2 (captureandvoid), Payouts v1, Log in with PayPal (OpenID Connect), Webhooks (verify-webhook-signature), and the PayPal JavaScript SDK buttons. - Backend: Python, FastAPI, SQLite, httpx, per-deal locking, integer-cents money handling (storing
capture_idbefore sending payouts so retries never double-capture), and 851 automated tests that run offline with zero network calls. - Frontend: React 19, TypeScript, Vite, Tailwind CSS,
lightweight-charts, and 110 Vitest unit/integration tests. - AI: Google Gemini, Anthropic Claude, OpenAI, and Model Context Protocol (MCP) tools.
Challenges we ran into
- Preventing double-captures and double-payouts on retries: solved with per-deal locks and persisting
paypal_capture_idbefore initiating payouts. - Preventing prompt injection in freelancer submissions: isolating untrusted work text inside delimiters and enforcing deterministic
min_words/must_includechecks in Python so the AI can never override them. - Making the same PayPal
authorize → verify → capture/voidflow power both freelance deliverables and multi-day live paper-trading agent trials.
What we learned
- PayPal's
AUTHORIZE→capture/void+ Payouts flow is ideal for conditional agentic commerce. - Separating deterministic code checks from LLM judgment eliminates almost all reliability failure modes.
What's next
- Verifying live GitHub commits/PRs via MCP for engineering deals, Stripe/PayPal multiparty splits, automated webhook reconciliation on a persistent production host, and expanded asset feeds.