Inspiration

I've spent years on monetization and LiveOps for free-to-play games. More and more studios now pay people who aren't on their payroll: map and mod makers who earn a share of season revenue, and players who win community tournaments. Almost everywhere I looked, that money still moves through a spreadsheet and dozens of manual transfers. It breaks in the same places every season:

  • Farmed metrics. Bot farms and replay loops inflate a creator's numbers to grab a bigger share.
  • Duplicate payees. One person registers two creator accounts that pay out to the same inbox.
  • Thrown matches. A team is handed a win and walks away with the prize.
  • Disputes. "Why did I get less than last season?" has no written answer.
  • Unclaimed money. Payouts go to an address with no PayPal account, sit there, and bounce back 30 days later.

I wanted a tool that a community manager could trust with real money: an AI that does the tedious checking and explaining, and a human who stays in charge of every dollar that leaves.

What it does

PrizeDesk runs the whole payout cycle for two programs at once: a season creator fund (revenue share across 40 UGC creators) and a community cup (prize pool across 8 teams).

  1. Money in, through PayPal. Players buy supporter packs with PayPal Checkout, and half of every sale goes to the creator fund. A tournament sponsor pledges half of the cup's prize pool, so the agent sends them a PayPal invoice through the PayPal Agent Toolkit. The pool is credited only when PayPal reports the invoice paid.
  2. A split policy in plain English. For example: "70% by engaged playtime, 30% by unique players, cap each creator at 25%, minimum payout $10, hold anyone flagged." The agent turns it into a validated rule set. The math is done in code, never by the model, so every cent adds up.
  3. Fraud checks with evidence. Deterministic detectors flag bot sessions, replay farming, report spikes, accounts that share a payout inbox (including Gmail dot and plus aliases), and suspiciously short matches. Flagged recipients are held, and the agent explains each hold in one plain sentence, citing the evidence.
  4. Explainable amounts. Double-click any row in the payout ledger and the agent explains that recipient's amount against the season medians, in language you could forward to the creator.
  5. A human approves. The agent has no tool that can move money. The approval is bound to a fingerprint of the exact recipients, addresses and amounts, so any change afterwards blocks the payout. A hard per-batch ceiling applies, and a run can never pay out more than its pool has actually received.
  6. Pay everyone with PayPal Payouts. One batch, one click. Webhooks bring the results back in real time: who was paid, whose payout is unclaimed, what failed.
  7. Follow-through. A payout calendar (Bryntum Scheduler) shows earnings windows, holds under review, payout dates and 30-day claim windows. The agent drafts reminders for unclaimed payouts, and a person can pull back an unclaimed payout to re-send it. Every agent action, approval and PayPal event lands in an audit log.

How we built it

  • PayPal:
    • Payouts: batch create, status tracking, cancelling unclaimed items;
    • Checkout: Orders v2 with the JS SDK buttons;
    • Invoicing: create, send, get and record payment, via the PayPal Agent Toolkit;
    • Transactions: read-only, via the toolkit;
    • Webhooks: every delivery is verified with verify-webhook-signature and processed exactly once.
  • AI:
    • Google Gemini with function calling, behind a small provider interface;
    • a custom agent loop with seven tools, plus two read-only PayPal Agent Toolkit tools;
    • a deterministic offline model that runs the whole demo without an API key, and steps in if the LLM is out of quota (its replies are labeled as such).
  • App:
    • TypeScript, Express and React;
    • AG Grid for the payout ledger and Bryntum Scheduler for the payout calendar;
    • hosted on Render.
  • Data: synthetic and generated (40 creators, 8 teams, planted fraud cases), so no real players or games are involved.
  • Process: 44 automated tests cover the split engine, the fraud detectors, policy parsing, the guardrails, sponsor invoicing, webhooks, the agent and the API. I built PrizeDesk with Claude Code as an AI pair programmer; the product decisions and the payout and fraud rules come from my own LiveOps experience.

Challenges we ran into

  • Keeping the model away from arithmetic. In early tests the LLM "helpfully" re-computed prize splits and got a place wrong. Now every number the agent can mention, including per-place totals, is computed in code and handed to it, and the prompt forbids deriving new figures.
  • A safe public demo. Every visitor gets a private in-memory desk, routes are rate-limited, and demo payouts to unclaimable addresses are pulled back after an hour so the sandbox test money is recycled.
  • Idempotency done right. Identical demo data on different desks once reused the same PayPal sender_batch_id, and PayPal correctly refused it. Each draft now gets its own id, so a retried submit can never pay twice and two visitors never collide.

Accomplishments that we're proud of

  • The full money loop runs on PayPal. Money comes in through Checkout and Invoicing, and goes out through Payouts and Webhooks, all against the live sandbox.
  • Guardrails a finance team would accept. The AI does the tedious work, and a person signs off on exact amounts.
  • Every hold and every amount comes with a written reason.

What we learned

  • Agentic payments need hard boundaries. Agents are great at explaining and preparing. The decision to move money belongs to a person, enforced in code, not in the prompt.
  • Payouts are the beginning, not the end. The unclaimed and returned cases are where most of the real work is.

What's next for PrizeDesk

  • Import connectors for common game analytics exports.
  • Multi-currency payouts and Venmo for US creators.
  • Tax-form collection before the first payout.
  • Pilots with indie studios that run creator programs.

Built With

Share this project:

Updates

Submission history