Inspiration

Sold-out events still end up with empty seats. Paid events see a median no-show rate of about 17%, so roughly one in six tickets goes unused, while fans who missed out are left with manual waitlists or turn to resellers, where about 26% of buyers report getting fake tickets. (Indicative figures from vendor and survey data.)

Waitlists today email fans and hope they respond inside a short claim window. A fan who is asleep, in a meeting or on a train loses the seat to someone faster, so reaction time decides who gets it. Rule-based matching also can't handle detailed requests, such as a budget, a range of dates and a preferred tier all at once. We wanted to see what happens if an AI agent does that work, and PayPal moves the money safely at every step.

What it does

EventsMate is a ticketing platform where an agent resells the tickets you can't use and finds you seats at sold-out events while you get on with your day.

  1. Organisers set the refund rules. They write a refund policy in plain English. OpenAI turns it into a structured rule and quotes the exact sentence each clause came from. Code checks that every quote is real and every number is in range, and the organiser confirms it. This gives the agent rules it can follow and that everyone can read.
  2. Fans find events. Plan with AI is a chat assistant that answers from the live event catalogue. It understands budget, dates and interests, recommends real events and offers to buy a ticket. For sold-out events it offers standby instead. It can also answer questions about a fan's own tickets, upcoming events, schedule clashes and standby status.
  3. Fans join standby once. The fan tells the agent in plain words what they want and the most they'll pay, then pre-authorizes the payment with PayPal. The pre-authorization is a hold, not a charge: the fan pays only if the agent gets them a seat, and never more than they approved. After that they get on with their day, with no notification to catch and no claim window to miss.
  4. Holders release seats they can't use. Before confirming, they see exactly what they'll get back and the policy sentence behind it.
  5. The agent settles both sides. The moment a seat is released, the agent matches it to a waiting fan. It captures that fan's hold for the actual tier price, refunds the original holder under the organiser's rule and transfers the ticket. Nobody waits on an inbox, and every step carries a real PayPal sandbox reference.

How we built it

  • PayPal: Orders v2 and Payments v2 (server SDK and JS checkout SDK) for create, capture, authorize, capture of an authorization, partial refund and void. All of it runs in the PayPal sandbox.
  • OpenAI: the Responses API with strict JSON schemas for the refund-policy reader and the Plan with AI planner (intent classification, preference extraction and ranking).
  • Strong schema checks: every AI output is schema-checked and re-validated on the server before any money moves. Prices, sold-out status, budget sums, dates and refund amounts are all computed in code, never by the model, and the agent never charges anyone from a typed sentence alone.
  • Safe money handling: Settlement runs capture first, refund second, transfer last. If the capture fails, nobody is refunded and the seat moves to the next fan. Holds are voided 2 hours before the event.
  • Stack: Next.js 16, Supabase Postgres (row locks during settlement so a seat can't sell twice), shadcn/ui, Zod, deployed on Render.

Challenges we ran into

  • Keeping an AI agent away from money mistakes. We separated understanding (the model) from deciding (code). Everything the model returns is validated against real data, and unknown event IDs are discarded.
  • Pricing a hold we can't know in advance. A standby request can match different tiers, so the hold has to cover the worst case, and the fan is charged only the actual price at settlement.
  • Ordering the money steps. A failed capture after a refund would leave the organiser out of pocket, so the order is capture, then refund, then transfer, with idempotent PayPal calls.
  • Race conditions. Two released seats and two waiting fans at once could double-sell a ticket, which is why settlement uses database row locks.
  • Reusing existing flows. The chat had to hand off to the existing buy and standby dialogs instead of duplicating payment logic, while staying compatible with our teammates' work.

Accomplishments that we're proud of

  • A full, live loop in the PayPal sandbox: hold, capture, partial refund and void, each with a visible PayPal reference.
  • An agent that acts for the fan after one approval, but only inside rules it can't break.
  • A chat assistant that answers from real data (tickets, schedule clashes, standby status) instead of guessing.
  • One consistent confirm card for every money action, so users always see what will happen before it does.

What we learned

  • For anything involving money, AI works best as a translator and ranker, with deterministic code as the final authority.
  • PayPal's authorize-then-capture model is a natural fit for agentic commerce: it lets users give a standing instruction without handing over blank-cheque access.
  • Showing users the policy sentence behind a refund builds more trust than just showing the number.

What's next for EventsMate

  • AI-assisted matching that picks the allocation filling the most requests (today matching is rule-based).
  • PayPal webhooks for fully asynchronous settlement events.
  • An organiser dashboard with a data grid and a calendar of events, holds and cutoffs.
  • Multiple organisers, real event data and notifications by email or SMS.

Built With

Share this project:

Updates

Submission history