💡 What inspired us
Everyone has made a promise to themselves and broken it. "I'll run three times this week." "I'll go to the gym every morning." We mean it on Sunday night, and by Wednesday it's gone, because breaking a promise to yourself costs nothing.
Then we noticed something. When we told a friend about a goal, or bet a friend $20 on it, we kept it far more often. It wasn't willpower. Something was finally on the line.
That gave us the idea for Promise Keeper: your word, now with money on it. You bet your own money on your own goal. An AI checks your proof. When the deadline comes, PayPal refunds you if you kept your word, or pays your stake to a friend if you didn't.
The PayPal + AI hackathon fit perfectly. The idea only works if real money moves on its own and can be trusted, and if an AI can fairly judge whether you actually did the thing.
🏃 What it does
- Lock it in. Type your goal the way you'd text a friend: "run 2 miles every day this week or $20 to Alex." Claude turns it into a clear deal (run 3.2 km, 4 times, by Sunday 11:59 PM, $20 to Alex). You can edit any word of it. Then you pay the stake with the PayPal button. The promise only becomes active once PayPal confirms the payment is COMPLETED.
- Prove it. Your workouts are the proof:
- Strava and WHOOP: connect once, and recorded runs, rides, hikes and workouts count by themselves.
- Screenshots: upload a screenshot from Apple Health, Apple Fitness rings, Fitbit, Google Fit, Strava or a gym app. Claude reads the number and the date. Old, edited or reused screenshots are refused.
- Gym check-in: your phone confirms you stayed within 150 m of your gym for 30 minutes. Then you take a live photo holding a one-time secret word, and Claude checks it.
- Settle up. At the deadline, the promise agent (Claude using tools) settles everything on its own. It checks the facts, confirms each stake with PayPal, refunds the people who kept their promise, sends missed stakes to the friend through PayPal Payouts, and writes each person a short note explaining what happened.
🛠️ How we built it
Frontend: React 19, Vite and Tailwind CSS 4, hosted on Vercel. The centerpiece is a 3D chrome coin built with React Three Fiber. On the landing page it acts out the story as you scroll: it spins at rest, a ring clamps around it when you lock in $20, segments of the ring light up as you prove each workout, and it flips and glows mint when you settle up. Inside the app we used a bright "daylight glass" style: frosted cards, a 3D money card in the Wallet that flips to show the breakdown, a split-flap scoreboard for your stats, and a timeline that draws itself as you scroll.
Backend: Python 3.13 and FastAPI, hosted on Render. The backend is the only part that holds secrets, and it makes every PayPal and AI call.
Database and sign-in: Supabase, with Postgres plus row-level security, sign-in by Google or email link, and a private storage bucket for proof photos. Photos are only shown through short-lived signed links, after checking who's asking.
PayPal (sandbox):
- PayPal JavaScript SDK (PayPal Buttons) for checkout. You can pay with a PayPal login or as a guest with a card.
- Orders API v2 to create and capture the stake. The amount always comes from the server, never the browser.
- Refunds API to return the full stake to winners.
- Payouts API to send missed stakes to the friend.
- PayPal Agent Toolkit so the AI agent asks PayPal directly whether a stake was really captured before any money moves.
AI: Claude (claude-opus-5-5) is our main AI, with Gemini as an automatic backup. It does four jobs:
- Promise reader: structured outputs turn plain words into a deal. Code then checks every value (stake limits, dates, goal ranges).
- Screenshot reader: vision reads distances, steps, minutes and the date from fitness screenshots.
- Live photo check: confirms the secret word is visible and the photo looks like a gym.
- Promise agent: a tool-use loop with five guarded tools: get the facts, verify the stake, refund a winner, send the payouts, and finish with a note.
The rule we were proudest of: the AI decides the order and writes the words, but code decides the money. The tools in settle.py decide who kept their promise and every amount. The AI can't pay the wrong person or pay twice. If the AI is down or stops halfway, a backup (finish_by_code) completes the same steps.
Money rules, enforced in code:
- Money is always stored as whole cents (2000 = $20.00). No floats.
- Every stake ends as exactly one refund or one payout. Nothing is left in limbo.
- Every refund has a unique PayPal-Request-Id and every payout a unique sender_batch_id, so settling is safe to run any number of times.
- Refunds go back to the PayPal account that actually paid, never a typed-in email.
We followed one rule the whole way: build the riskiest part first. On day one, before any screens existed, we wrote a PayPal test script that made a payment, a refund and a payout in the sandbox. Once money moved reliably, we built everything else on top. Every step ended with a test, and the backend has more than 80 automated tests running against a fake database and a fake PayPal.
🧗 Challenges we ran into
Stopping cheaters. If an old photo can pass, the whole idea fails. So we stacked checks: GPS distance to the gym, a 30-minute stay, camera-only photos (no gallery uploads), a duplicate-photo detector that catches near-identical images, and a one-time secret word in each photo. Screenshots must show Today or today's date, and each source can only be counted once. We also limited counting to one proof per day, so nobody can do a whole week's goal in one afternoon.
The secret word kept expiring. At first we gave out the live word at check-in. But the word expires in 10 minutes and a gym visit takes 30, so it was always dead by the time you took the photo. We moved it to the moment you tap "I'm done."
Making money safe to repeat. The settle step might run twice (a retry, a cron job, a page load at the same moment). Double refunds or double payouts would be a disaster. Unique PayPal request IDs, batch IDs and an atomic "claim" in the database make every money action happen exactly once.
Trusting an AI with money. Letting an AI agent move money is scary. Our answer was guarded tools: the AI can only call tools that check the rules themselves, and PayPal is asked directly before any money moves. There's also a backup that finishes in plain code if the AI fails.
AI reliability. We started on Gemini, but its models often returned 503 errors during the build, and its tool-calling only accepted results sent back with role user, not tool. Near the end we switched to Claude as the main AI using structured outputs and a tool-use loop, and kept Gemini as an automatic backup. Results became much more consistent.
Tooling surprises.
The PayPal sandbox checkout page sometimes hung on "reviewing payment" when an order had no return URL (the in-app pop-up button was fine).
The PayPal Agent Toolkit package pinned heavy dependencies we didn't need, so we installed it without them and used only its core.
The Supabase SQL editor kept sending empty queries, so we ran schema changes directly against the database instead.
Render's free plan puts the server to sleep, so a cron job pings it every 10 minutes to make sure deadlines settle on time.
Strava lets people type in "manual" activities, so we ignore those. Only recorded workouts count.
Apple Health has no web access. Apple doesn't let websites read Health data. We tried an iPhone Shortcut, but it was too fiddly for users, so we dropped it. Apple Fitness and step goals are proven by screenshot, which Claude reads and date-checks.
Knowing what to cut. We started with promises about anything, proven by photos, study-note quizzes or a friend's confirmation. Halfway through, we saw that "anything" was too broad to judge fairly in a week. We narrowed to fitness only, where real data from Strava, WHOOP and fitness apps makes proof honest. We also first let missed stakes go to charity, then made them always go to a friend, because losing money to someone you know is the strongest push. (Older charity pots still settle correctly, so no money gets stuck.)
🏆 Accomplishments we're proud of
- Real money flow, end to end: pay, prove, then an automatic refund or payout, all through PayPal, with nothing ever lost or doubled.
- An AI agent that settles money on its own and can't break the money rules.
- Anti-cheat checks that make the proof mean something.
- A design people want to look at: the 3D coin that tells the whole story as you scroll.
- It works on phones as well as laptops, with a one-click demo account for judges.
📚 What we learned
- Do the scariest part first. Proving PayPal Payouts on day one took away our biggest risk early.
- AI is great at reading and explaining, and code is better at deciding money. Splitting those jobs gave us an agent we could trust.
- Idempotency matters. "What if this runs twice?" is the most important question in any payment system.
- Cutting scope is a feature. Going from "anything" to "fitness" made the product stronger, not weaker.
- Always have a fallback: a backup AI model, a backup code path, and a cron job for a sleeping server.
- The details make it feel real. Plain error messages, live countdowns and a short note explaining why you got refunded build trust.
🚀 What's next for Promise Keeper
- A native iPhone app with HealthKit, so Apple data comes in directly instead of by screenshot.
- Group pots: friends bet together, and the people who keep their word split the missed stakes.
- Stronger anti-cheat, including fake-GPS detection and checking that you actually worked out, not just sat in the gym.
- Moving from the PayPal sandbox to live payments.