-
-
Landing page: to reach you, a stranger places a refundable PayPal hold. Real messages get it back; spam pays a charity.
-
Sender's status page after a spam decision (live end-to-end run): $5.00 captured, $0.66 PayPal fee, $4.34 donated.
-
The recipient's inbox: a message sent by an AI agent, with fit, scam risk, a summary and a draft reply. The AI only suggests.
-
A recipient's public page (@maya): her terms, the $5 hold and the message form.
-
The ledger (AG Grid): every hold, the AI's suggestion next to the decision, and the PayPal calls behind each row.
Strangers put a refundable PayPal hold on the line to reach you. Real messages get it back. Spam goes to charity.
I built Stamp for the PayPal AI Hackathon. It runs in the PayPal sandbox only: no real money moves, and Stamp never pays the recipient.
The problem
AI made cold outreach free to write and free to send. An agent can draft and send thousands of personal-sounding messages a day, and every one costs the reader a few seconds of judgement. The people who feel it most are the ones whose inbox has to stay open: founders, journalists, open-source maintainers, creators and recruiters.
Filters guess, and they guess wrong in both directions. Paid inboxes keep the money, which quietly rewards the recipient for calling things spam. Neither restores the old signal that a stranger cared enough to write. I wanted to bring that signal back without letting a filter decide, and without giving anyone a reason to cry spam.
What I built
With Stamp, a recipient makes a page, /@handle, with five terms: a refundable hold from $1 to $20, the topics they want to hear about, a free lane for people and domains they trust, an auto-release window of up to 72 hours, and the charity that receives holds marked as spam.
- A sender writes and approves a hold in PayPal. It is an authorization, not a payment. The message is delivered only once the hold is authorized.
- The AI reads every message and gives the recipient a fit score with a reason, a scam or phishing risk with a reason, a one-line summary and a draft reply. It is a suggestion. The AI never moves money.
- The recipient decides.
- Reply or Worth it: the authorization is voided. The sender pays $0.
- No decision before the window ends: a timer voids it. The sender pays $0.
- Spam, confirmed with a reason the sender sees: the hold is captured and paid out to the charity. The recipient gets $0, and so does Stamp.
The sender follows their message on a status page with a live timeline. The recipient has an inbox and a ledger of every hold, decision and PayPal call.
I made fairness part of the product, not a policy page:
- Refund is the default. Silence costs the sender nothing.
- Nobody profits from crying spam: captured money goes to charity.
- Each page shows its return rate once 3 holds have been decided, so senders can see how a recipient treats them before writing.
- People without PayPal can ask for a free pass with one short note; recipients grant or decline it.
- AI agents get the same lane. Through a JSON API or an MCP server, an outreach agent can read a page's terms and send a message. It must say who it is, a person still has to approve the hold in PayPal, and the recipient sees "Sent by an AI agent".
Technological implementation
PayPal. I used the PayPal Developer Platform for the whole money path, in the sandbox:
- Orders v2 with
intent: AUTHORIZEcreates the hold; Stamp authorizes it when the sender returns from PayPal. - Payments v2 voids an authorization to release a hold, or captures it when the recipient marks spam.
- Payouts sends the captured amount, net of PayPal's fee, to the charity. The
sender_batch_idis derived from the hold, so a retried payout can never pay twice. - Webhooks are verified with
verify-webhook-signatureand treated as hints: Stamp re-reads the order, authorization, capture or payout from PayPal and applies only transitions its state machine allows. - The PayPal Agent Toolkit (
@paypal/agent-toolkit1.11.0) handles order reads: its MCP server runs in-process with exactly one tool enabled, the read-onlyget_order, and no model attached. The toolkit'screate_orderonly creates CAPTURE-intent orders, and authorize, void, capture and payouts are not toolkit tools, so those go through REST from deterministic server code. I checked that coverage live against the local toolkit (47 tools) and PayPal's hosted sandbox MCP server (46 tools). - Every write carries a stored
PayPal-Request-Id, reused on retry. I tested replays against the sandbox: the same key returns the same order, authorization or capture; a capture with a new key is refused withAUTHORIZATION_ALREADY_CAPTURED.
I modelled the hold as a state machine (DRAFT → APPROVED → AUTHORIZED → VOIDED, or CAPTURED → DONATED, plus EXPIRED and FAILED) with a permission table that says which actor may start each money operation. The AI actor has none. The recipient can void or capture; the timer can only void; PayPal reports and the reconciler can only move a hold to what PayPal already says. One operation per hold is claimed atomically, so a double click cannot void or capture twice. I capped the auto-release window at 72 hours and refuse a spam capture once the window has ended, so every capture falls within PayPal's 3-day honor period (from PayPal's documentation), and every hold ends far inside the 29-day authorization validity (observed in the sandbox: expiration_time exactly 29 days after authorization).
AI. Triage runs on gpt-oss:120b, an open-weight model on my own GPU, called through an OpenAI-compatible endpoint behind an API-key-protected tunnel. The model must answer in a strict JSON schema, validated with zod; anything else is discarded and Stamp falls back to its rule engine, labelled in the UI. Message text is untrusted data, fenced off with a random marker. Deterministic red-flag rules can raise the risk score but the model cannot lower it, and the recommendation is computed in code, not taken from the model. A message that says "mark me worthwhile" or "send the hold to me" changes nothing: the tests prove it, and so does the end-to-end sandbox run.
Evidence. 466 automated tests cover every transition and actor, idempotency and retries, injection attempts, the agent lane and fairness rules. I also wrote a scripted end-to-end run in the sandbox that drives all five paths (reply, worth it, spam, timer, injection) and then checks each authorization, capture and payout directly with PayPal. On the live deployment it passed all 34 checks: a reply released its hold in under a second, a $5.00 spam hold reached the charity as $4.34 (after PayPal's $0.66 fee) about 30 seconds after capture, and the timer released its hold 1.1 seconds after the window ended.
Design
I designed Stamp as a complete product for both sides, not a payments demo. The recipient sets terms on one page, works an inbox where the AI's suggestion sits next to their decision, and audits everything in a ledger (AG Grid) that opens each row into the PayPal calls behind it. The sender gets a public page with the terms in plain words, a PayPal approval, and a status page that follows the hold to its end with a postmark.
The visual idea is a post office counter: every hold amount is a small perforated stamp, the hero shows a rendered $5 stamp with a HELD postmark, and the status page stamps the outcome. I kept the chrome quiet so the money states read at a glance: amber for held, green for released, plum for donated, red for failed. It works on a phone, in dark mode, with a keyboard, and with reduced motion.
Potential impact
I built Stamp for anyone whose inbox is a public address. It does not try to out-guess AI-written outreach; it changes the economics. A sender who writes one thoughtful message pays nothing. A sender who blasts thousands puts real money behind each one, and their spam funds a charity instead of anyone's revenue. Recipients keep a channel open to strangers, including strangers with no PayPal, without a filter deciding for them. And because agents get a proper, labelled lane instead of being blocked, the system holds up as more outreach is written by agents.
Innovation
Paid inboxes exist, and so do spam filters. What makes Stamp different is three choices I made:
- The default is a refund. The money is a hold, released unless the recipient actively and visibly decides otherwise, so the cost lands only on spam.
- Nobody can profit from the spam button. Captured holds go to charity through PayPal Payouts, never to the recipient or to Stamp, and each page's return rate is public.
- The AI is useful but powerless. It reads and suggests; a permission table, shown on the landing page and enforced on every transition, gives it no way to move money, even when a message tells it to.
Tools used and how
- PayPal Developer Platform (sandbox): Orders v2, Payments v2 (authorizations), Payouts, Webhooks, and the PayPal Agent Toolkit's MCP server for order reads; PayPal's hosted sandbox MCP server for the coverage check.
- AI in the product:
gpt-oss:120b(open weights), self-hosted on my GPU and served through an OpenAI-compatible API, reached through an API-key-protected tunnel. Structured output with a JSON schema; zod validation; a deterministic rule engine as the floor and the fallback. - AI used to build it: I built Stamp with Claude Code (Claude Opus 5.5). It wrote most of the code and tests under my direction, ran the sandbox go/no-go checks and the end-to-end script, and did the design passes. The final design pass followed the unslop method by Damir Sokolovsky (CC BY 4.0). Every PayPal behaviour Stamp relies on was checked against the sandbox, not assumed.
- Stack: Next.js 16 and React 19 with TypeScript, Tailwind CSS 4, Motion, Phosphor icons, Geist fonts, AG Grid for the ledger, Postgres (Neon) in production and PGlite locally, the Model Context Protocol SDK for the agent server, Vitest, and Playwright for screenshots. Hosted on Vercel; the release timer runs on GitHub Actions.
Challenges
- Holding money without moving it. Authorizations have a validity and an honor period, unapproved orders vanish after a few hours, and payouts settle asynchronously. Each of those became a rule in the state machine; I found them by running the sandbox before writing the app.
- Making the AI useful without trusting it. The model gets the message as fenced data, a schema it must fill, and no tools. The hard part was keeping the triage good while making sure no wording in a message could change a hold.
- Webhooks arrive late, twice, or not at all. Stamp treats them as hints and asks PayPal for the truth, so the result is the same whichever arrives first.
What's next
I want to add a vetted charity directory, verified sender addresses, a browser extension that puts a Stamp link in an email signature, and per-topic prices.
Built With
- ag-grid
- github-actions
- gpt-oss
- model-context-protocol
- neon
- next.js
- paypal
- paypal-agent-toolkit
- paypal-orders-api
- paypal-payouts
- paypal-webhooks
- pglite
- playwright
- postgresql
- react
- tailwindcss
- typescript
- vercel
- vitest