Inspiration
Every freelancer and buyer knows the moment when the payment worked but the promise didn't: you send the deposit and the designer replies with a read receipt, or you deliver the logo and the client vanishes. Payments are instant and final, but the promise behind them lives in a chat thread, and AI agents are about to spend real money for us with nothing but a card number. We wanted money that moves only when the promise behind it is kept, backed by proof instead of trust.
What it does
Kept lets you describe a deal the way you'd text it ("Pay the designer $300: $100 now, $200 when the logo lands, refund me if nothing shows in a week"). Claude turns it into promises and payment rules and flags scam patterns. A verifier proves nobody can be cheated across every possible order of deliveries, deadlines and reviews. Both sides approve the same fingerprint, PayPal holds the money as an authorization, and it is released by partial capture and Payouts only when the promise is kept. Every step goes into a signed, hash-chained receipt trail that nobody can rewrite, not even us. The same engine gives AI agents a budget instead of your card, with caps, approvals and a merchant allowlist enforced by code.
How we built it
Kept runs on PayPal Orders v2 (authorize intent), Payments v2 (partial capture, reauthorization after the 3-day honor period, void, refund), Payouts v1 and Webhooks v1, with a PayPal-Request-Id on every money-moving call so a retry can never pay twice. Claude writes the promises and rules, repairs rules from the verifier's counterexamples, checks delivered work and screens agent purchases, but it can never move money on its own. The verifier is a small typed contract language with an exhaustive model checker in TypeScript. It explores every reachable state \( s \) of a deal and proves that money is always conserved:
$$\text{held}(s) + \text{released}(s) + \text{refunded}(s) = \text{funded} \quad \text{for every reachable } s$$
It also proves that nothing gets stuck and that every promise holds. On the first draft of the logo deal it found a real bug, where the designer delivers on time and still loses $200. After Claude repaired the rules, it proved 6 properties across 9 reachable states. The backend is Convex (auth, engine, outbox, scheduler, REST API and a remote MCP server), the web app is Next.js and React with AG Grid for the tamper-evident money trail, and Kept's fee is taken only from money that is actually released:
$$\text{fee} = 2.5\% \times \text{released}, \quad \text{so a } \$300 \text{ deal costs at most } \$7.50$$
Challenges we ran into
We couldn't sign in to the PayPal Developer Dashboard before the deadline, so we had no sandbox keys. Instead of leaving the PayPal path untested, we tested Kept's real PayPal code end to end against PayPal's own published OpenAPI specifications, using a stand-in PayPal that checks every request and every response against those specs and enforces PayPal's money rules. The full flows pass with zero spec violations, and the testing found and fixed real bugs, including a payment that could get stuck if someone confirmed before approving. The demo video runs on Kept's built-in PayPal simulator and says so on screen. Judges can run it on their own sandbox in about 10 minutes with JUDGES.md, and npm run paypal:check confirms their setup in seconds.
Accomplishments that we're proud of
A deal can't go live until every possible future has been mathematically checked, the AI can propose but never move money, and the receipt trail can't be rewritten, all backed by 79 automated tests including the full PayPal lifecycle against PayPal's published specs.
What we learned
Most payment disputes aren't fraud but two people remembering a deal differently, so writing the deal down precisely and proving the money can only follow it removes most arguments before they start. We also learned to test against the contract PayPal publishes rather than against our own assumptions.
What's next for Kept
Next is a live run on the PayPal sandbox, then PayPal's multiparty flows for production so funds stay in PayPal's custody end to end, more deal templates such as rent deposits and supplier orders, and agent budgets on more storefronts. The code is open source at github.com/willburhachita/kept.
Built With
- ag-grid
- anthropic
- channel3
- claude
- convex
- mcp
- next.js
- node.js
- openapi
- paypal
- paypal-orders-api
- paypal-payments-api
- paypal-payouts
- paypal-webhooks
- react
- tailwindcss
- typescript
- vitest