Inspiration

Bulk pricing is everywhere: courses, software seats and gear all get cheaper per unit when you buy ten. But one person can't buy ten, and pooling money with strangers needs trust nobody has. Who holds the money? What if the group never fills? We wanted the price drop of buying together without anyone ever paying for a deal that didn't happen.

What it does

Group Buy lets strangers pool together for a seller's group price.

  • A seller lists a product with a solo price, group tiers (e.g. $350 alone, $300 at 10 buyers, $270 at 25) and a private lowest price.
  • A buyer joins and approves a PayPal hold for the most they'd pay: an authorization, not a charge.
  • Every new buyer pushes the price down for everyone already in.
  • At the deadline, two AI agents negotiate. If some buyers' max is below the price the group earned, the buyers' agent argues for a lower price that keeps them in, and the seller's agent weighs the extra sales against its private floor.
  • PayPal captures every hold once, at the same price, never more than what each buyer approved. If the group misses its minimum, every hold is voided and nobody pays.

In our demo, three buyers held $100, $95 and $75 against a $90 group price. The $75 buyer would have been dropped; the agents settled at $75, and PayPal captured $75.00 from all three.

Three ways to join: the website, Ask AI (type "the UX course by Friday, max $180"), or Claude via MCP. Sellers get a dashboard with live holds, PayPal IDs, every negotiation transcript and every PayPal event.

How we built it

  • PayPal Orders v2: AUTHORIZE on join, capture at the group price with final_capture, void on failure or leave. Every authorize, capture and void carries a request ID built from PayPal's own IDs, so retries can never charge twice.
  • PayPal webhooks: every event is checked with PayPal's signature verification before it's applied, and each event is applied exactly once. An approved order becomes a hold even if the buyer closes the tab before returning to the site; voids, completed captures and denied captures keep each hold's state in sync with PayPal.
  • AI on Groq (gpt-oss-120b): an intake agent (free text → product, max, deadline, via strict JSON schema) and the two negotiation agents.
  • A code referee: the model only proposes; code decides. Price stays between the floor and the earned tier, the seller can only come down and the buyers only up, max 4 rounds, invalid moves are rejected and logged. The floor never reaches buyers, the public API or the buyers' agent.
  • MCP server (FastMCP) with find_deal, join_deal, deal_status, leave_deal.
  • Web: Next.js 16, Tailwind, and AG Grid for the seller dashboard. Backend: Node 24, TypeScript, SQLite. Deployed on Render.
  • Tested against the real sandbox: Playwright approves holds through PayPal's checkout page, and tests check real PayPal states (authorized, captured at the negotiated price, voided), including a buyer who approves and never comes back.

Challenges we ran into

  • Capturing less than was authorized, once, with partial drop-outs and safe retries after a crash.
  • PayPal's honor period: holds expire, so groups close within 3 days.
  • Buyers who approve in PayPal but never return to the site: webhooks close that gap, and forged events are rejected by PayPal's own verification.
  • Keeping the seller's floor secret from buyers, the public API and the buyers' agent, while still letting agents negotiate around it.
  • Dates in plain English: we give the model a calendar and validate every date in code.
  • Making agent negotiation safe with real money: the referee, not the model, has the final say.

Accomplishments that we're proud of

  • The full money flow works end to end in the PayPal sandbox, including a real capture at a price two AI agents agreed on.
  • Hold state stays in sync with PayPal through verified webhooks, even when buyers drop off mid-flow.
  • One code path for website, Ask AI and Claude, so the same rules apply everywhere.
  • AI that is genuinely useful but can't move money or reveal anything it shouldn't.

What we learned

  • Payment authorizations remove the trust problem from group buying: hold now, decide later.
  • Let the model talk; let code decide.
  • Test against the real thing. The sandbox caught issues no mock would have.

What's next for Group Buy

  • Buyer accounts and per-seller logins.
  • Moving from sandbox to live payments.

Built With

Share this project:

Updates

Submission history