Inspiration
Brands get stuck with end-of-life stock. A liquidator pays pennies (\$38 for \$279 headphones), and a public markdown breaks their minimum advertised price (MAP) policy. Shoppers would happily say "I'd buy it at \$229," but free bids mean nothing. PayPal authorization holds make every bid real money, and AI agents make bidding effortless.
What it does
Holdfast is a private, held-bid market for overstock: agents bid, code clears, PayPal settles.
- Shoppers, or their AI agents, bid with a PayPal hold: held, not charged.
- If a store sells cheaper, the hold is released automatically.
- The brand sees a private demand curve and clears $N$ units.
- Each winner pays exactly their own bid. Everyone else's hold is released.
With bids sorted so that $b_1 \ge b_2 \ge \dots$, clearing $N$ units gives the brand
$$ P = (1 - 0.09) \sum_{i=1}^{N} b_i $$
For the demo, that's \$49,261 vs \$9,120 from a liquidator.
How we built it
- Stack: TypeScript, Fastify, Postgres, React. Hosted on Render.
- PayPal REST: Orders v2
AUTHORIZE, capture and void, Vault, Payouts and webhooks, all idempotent. - AI: Claude buyer and brand agents, plus an MCP server so Claude Desktop can bid.
- Other tools: Channel3 for prices, AG Grid and AG Charts for the brand console, Resend for email.
Challenges we ran into
- Hold expiry. Card holds last 3 days, so the bidding window, live rounds and Clear must all fit within 60 h.
- Races. Raising a bid while the brand clears could charge a shopper twice. Fixed with strict lock ordering and idempotent PayPal calls.
- Declined captures. The next bidder is promoted at their own bid.
Accomplishments that we're proud of
- Agents move real sandbox money: holds, captures, voids and a payout.
- The clearing rule is fair and auditable.
- The demo is honest: simulated bidders are labelled SIM.
What we learned
A hold turns a wish into committed demand. Let agents decide what to bid, and leave who wins to plain code.
What's next for Holdfast
- PayPal multiparty payouts
- Refunds
- A storefront plug-in
- Pre-season demand books
Built With
- ag-charts
- ag-grid
- anthropic
- channel3
- claude
- claude-desktop
- fastify
- log-in-with-paypal
- mcp
- node.js
- paypal
- paypal-orders-v2
- paypal-payments-api
- paypal-payouts
- paypal-vault
- paypal-webhooks
- postgresql
- react
- render
- resend
- tailwindcss
- typescript
- vite
- zod