Inspiration

Every freelance job ends with a leap of faith: the buyer pays first and hopes or the provider works first and hopes. When something breaks, it's "it doesn't work" against "yes it does", with no shared record of what was promised. We wanted payments that follow proof instead of trust.

The hackathon's own ideas list includes paying contractors when a job is marked complete and paying gig workers the moment a task is approved. OutcomeGuard takes that one step further: the trigger is not a status flag but verified evidence plus the buyer's explicit approval.

What it does

OutcomeGuard ties a PayPal payment to proof that the agreed work was delivered.

  1. The buyer describes the job in plain English. Claude turns it into measurable acceptance criteria each quoting the buyer's words; "must" stays blocking; AI ideas are opt-in suggestions. The buyer locks a versioned, hashed agreement.
  2. The buyer approves the payment in PayPal; it is authorized, not captured.
  3. The provider submits the delivery. Real tools verify it: a Chromium browser checks the phone layout and submits the contact form to a controlled endpoint; Google Lighthouse measures performance. Evidence is stored by content hash.
  4. What no tool can decide (e.g. accessibility) goes to an authorized human reviewer.
  5. A deterministic policy is re-checked at the moment of capture; the buyer approves separately; then PayPal captures. Later problems can be resolved with a partial refund that both parties approve.

AI drafts and explains; tools verify; humans approve; PayPal executes. AI can never move money.

How we built it

  • PayPal: Orders v2 (intent=AUTHORIZE, buyer approval), Payments v2 (capture, partial refund, void), PayPal-Request-Id idempotency, read-first reconciliation of lost responses, webhook signature verification (live webhook delivery not yet exercised).
  • AI: Anthropic Claude (claude-sonnet-5-5) via the official SDK with schema-constrained outputs; deterministic post-checks on every draft; evidence explanations grounded against stored measurements; USD budget with atomic reservations; prompt-injection containment.
  • Verification: Playwright Chromium + pinned Lighthouse in a worker behind an SSRF-guarded egress proxy; controlled form-sink with HMAC run tokens.
  • Backend: FastAPI, PostgreSQL, SQLAlchemy, Alembic; pure policy functions; database triggers enforcing payment bindings; hash-chained audit log.
  • Frontend: Next.js 16, TypeScript, Tailwind, AG Grid Community for the payment & evidence ledger; a backend-for-frontend so the browser never holds an API token.
  • 420 backend tests, 47 browser tests, CI on every push.

Challenges we ran into

Making money movement safe under uncertainty: a lost PayPal response must never become a second payment we reconcile by reading PayPal first and stop for an operator when PayPal's records are unclear. Keeping AI useful but powerless: stated vs suggested criteria, mandatory wording that cannot be weakened, grounded explanations. Honest labelling: real Sandbox vs simulated payments, human vs scripted demo decisions.

Accomplishments that we're proud of

End-to-end proof-gated payments on real PayPal Sandbox with verification by real tools and an audit trail a judge can inspect and a UI that keeps AI, tools, humans and PayPal visibly separate.

What we learned

Authorize-then-capture is a powerful primitive for outcome-based payments; the hard part is not calling the API but deciding deterministically and auditably when to call it.

What's next for OutcomeGuard

More deliverable types (APIs, mobile builds, documents), richer accessibility tooling, notifications, a hosted pilot with freelancers and agencies.

Built With

  • anthrohic
  • claude-opus-5
  • claude-sonnet-5-5
  • orders-v2
  • payments
  • payments-v2
  • playwright/chromium
  • reviews-or-payments.-paypal-developer-platform-(sandbox):-orders-v2
  • sandbox
  • webhooks
Share this project:

Updates

Submission history