Inspiration
Around 2.5 million unwanted Secret Santa gifts go straight in the bin every year in the UK alone, according to Love2shop. In a HIPPO survey of 2,000 UK adults, workmates were the top source of the presents people throw away.
Apps that draw names have existed for years. Nobody solved what comes after. Someone forgets, someone overspends, someone gets a seventh mug, and the organizer spends December chasing people. An AI agent could do all of that, but who lets an agent spend their money? That question is what Tinsel is built around.
What it does
Tinsel runs a team's gift exchange from the draw to the gift. The demo runs for Fernhill Studio, a fictional team of six, on the PayPal sandbox.
Everyone holds their budget. Each person approves a hold on PayPal. The money is reserved, not charged.
The agent draws the names and shops. It searches 100M+ real products through Channel3, working from each person's tastes, a wishlist link or a photo. Each giver gets three ideas, in stock and under budget, with a reason for each.
Only the exact price is charged. Choose a gift, or let Tinsel choose. It checks the price again, takes exactly that from your hold, and the rest is released on the spot: held $30.00, charged $24.95, $5.05 back.
Things go wrong, and it copes. When someone drops out, their hold is released and the draw repairs itself, touching as few people as it can.
Then you open the gifts, one box at a time.
Fast to drive. Ctrl K opens a command palette: what to ask Tinsel at this stage, holding your budget, the PayPal ledger, starting over.
Come back on another day and Tinsel picks up where you left off: how many gifts are bought, and how many days until they open.
Three limits make this safe to hand to an agent, and each one can be checked:
- It can't see the draw. The model only gets numbered slots and anonymous tastes. Ask it who drew you and it can only say it doesn't know.
- It can't overspend. The hold is a ceiling that PayPal enforces. A capture above it comes back refused, whatever the model says.
- It can't make up a gift. It can only propose what a search returned, and only buy what someone chose. The server takes the price from Channel3 at that moment.
How we built it
PayPal
| What | API |
|---|---|
| Holding a budget | Orders v2 with the AUTHORIZE intent, through the APIMatic-generated PayPal Server SDK |
| Approving it | PayPal JavaScript SDK v6 |
| Charging the exact price | Payments v2: a partial capture with final_capture, which releases the rest |
| Giving it all back | Payments v2: void, when someone drops out or the exchange is cancelled |
| Never charging twice | A PayPal-Request-Id per capture |
Channel3
| Endpoint | What for |
|---|---|
| Search | Each person's tastes, filtered to in stock, new and under budget |
| Search by image | Things like the photo someone shared |
| Lookup | Reading a wishlist link, and seeing if it fits the budget |
| Similar | "More like this", and alternatives when a wishlist item is over budget |
| Product detail | Checking price and stock again right before charging |
| Stickers | Cut-out pictures for the moment a gift is opened |
AI
- OpenAI GPT-5.4 mini, through a server proxy that holds the key, serves only the site's own pages and limits calls. The browser sends only the conversation: the instructions and tools are fixed on the server.
- Ten tools of our own:
checkExchange,drawNames,searchGifts,searchByPhoto,checkWishlist,proposeIdeas,pickGift,buyGift,handleDropoutandcancelExchange. - The model reads tastes, writes the searches, chooses and explains. The draw, the repair after a drop-out and the checks on money are tested code.
- If the model is unavailable, the same tools still run the exchange, with searches taken from each profile.
The rest: Next.js 16, React 19, TypeScript, Tailwind CSS, Vercel. Vitest and GitHub Actions for tests and CI.
Built from scratch during the hackathon, starting on 7 November 2026.
Built with AI. The code was written with Claude Code. Changes were checked in a real browser with Playwright. The demo video's voice is generated with OpenAI text-to-speech.
Challenges we ran into
- Keeping a secret from your own agent. A gift exchange only works if the draw is secret, and a model that knows it could let it slip. So it never knows: the tools hand it anonymous slots, and the link between a slot and a name stays in the browser.
- Trust. "The agent will stay on budget" isn't a guarantee. An authorization is. We tested the edge: PayPal refuses a capture above the hold, so the limit doesn't depend on the model behaving.
- Prices move. Between proposing an idea and buying it, a product can sell out or change price. The server checks again at the moment of purchase, and a failed purchase leaves the hold untouched so another idea can be tried.
- Drop-outs in small groups. Handing the leaver's person to whoever had them usually works, but rules can forbid it. The repair swaps as few people as it can, and says so when it can't.
Accomplishments that we're proud of
- An assistant that really spends money, inside a limit that a payment network enforces.
- A provable privacy claim: the model can't reveal the draw, because it never sees it.
- Six Channel3 endpoints doing real work, from the first search to the box you open.
What we learned
- The way to trust an agent with money is to limit what it can do, not to tell it to be careful.
- Authorizations are an old idea from hotels and car rentals, and they fit agents very well.
What's next for Tinsel
- A checkout partner, so that the order is placed and shipped without the giver seeing the address.
- Real invitations, with a server-side store.
- Holds with room for tax and shipping.
- Birthdays and leaving gifts, not just December.
Built With
- apimatic
- channel3
- claude-code
- gpt-5.4-mini
- next.js
- openai
- paypal
- paypal-javascript-sdk-v6
- paypal-orders-api
- paypal-payments-api
- paypal-server-sdk
- playwright
- react
- tailwindcss
- typescript
- vercel
- vitest