Inspiration

Shoppers check prices in seconds, and now their AI agents do it for them. A big-box store can price-match anything. An independent shop either loses the sale or matches blindly: it can't tell a real price from an open-box listing, a marketplace seller or a one-day pricing glitch, and every dollar off comes out of a thin margin.

We wanted the small shop to have its own agent on the other side of that negotiation: one that checks the claim, makes the cheapest fair counter-offer, and keeps protecting the customer after the sale.

What it does

Matchpoint is the price-match desk for Larkspur & Co., a demo independent shop. When a shopper, or their AI agent, finds a product cheaper:

  1. It verifies the claim. Channel3 resolves the competitor's link into a canonical product with every store's offers. Claude compares the two listings with a structured output (same product, variant, condition, bundle, model year), and every reason cites the listing field it read. Plain code then applies the shop's policy: approved store, in stock, new, cheaper, within the margin floor and maximum discount.
  2. It catches pricing glitches. A price that appeared on one day of the last 30, far below Channel3's typical price, is declined (or matched at the typical price, if the owner prefers).
  3. It counter-offers before giving cash. On a $407.99 pair of headphones that Best Buy sells for $359.99, it offers $60 of store credit instead of $48 off: worth more to the shopper, cheaper for the shop.
  4. It settles in PayPal. The PayPal order is created on the server at the agreed amount, priced from the database, never from the browser or the agent. The buyer approves it themselves.
  5. It protects the sale. Captured orders get 14-day price protection. Channel3 price tracking watches the approved stores, and a drop becomes a PayPal partial refund: automatic up to $50, owner-approved above that, with an evidence card and email.
  6. It talks to shopper agents. An MCP server (request_price_match, list_products, get_match_status) lets Claude Desktop, Claude Code or any MCP client ask for a match and get back the verdict, the evidence and a PayPal approval link. Agents can negotiate, but only the buyer can pay.
  7. The owner stays in charge. A console shows sales covered by protection against refunds paid, every decision with a "via agent" badge, and a versioned policy: change the maximum discount and the next decision follows the new rules, recording the version it used.

How we built it

  • Next.js 16 + TypeScript + Tailwind, Postgres + Drizzle. Money is integer cents and rates are basis points everywhere; no float touches a price.
  • Channel3: lookup, offers, price history with current_status, price tracking and price.changed webhooks (Svix-verified), a Collection for the approved stores, and similar for alternatives on a decline.
  • PayPal: Orders v2 (create, capture) and partial refunds through the APIMatic-generated PayPal Server SDK, built with APIMatic's PayPal Context Plugin. Webhooks are verified with verify-webhook-signature and de-duplicated into a ledger. The checkout page uses the PayPal JS SDK v6.
  • Claude (@anthropic-ai/sdk) with structured outputs parsed against a Zod schema, for the same-product judgment only.
  • MCP with @modelcontextprotocol/sdk over Streamable HTTP, with per-agent API keys and a rate limit.
  • A demo mode that answers every Channel3, PayPal and Claude call from recorded fixtures, so judges can run the whole flow with no keys.

Challenges we ran into

  • Condition data is messy. Channel3 sometimes merges open-box and refurbished pages into the new product, so an offer can say "new" when the URL ends in /openbox. We let Claude weigh the URL and title over the condition field, and send unclear cases to review.
  • Live prices move. Mid-build, Best Buy's sale on our headline product ended. We recorded real lookups, histories and model outputs so the demo is reproducible, and kept live mode for real runs.
  • Refunds must never pay twice. Webhooks get redelivered and price checks overlap, so each refund uses a stable PayPal-Request-Id per protection and price drop, and the database enforces one refund per drop.
  • Agents shouldn't hold the wallet. The MCP tool creates the order but returns an approval link; the payment only happens when the buyer approves it in PayPal.

Accomplishments that we're proud of

  • One match engine serves both the product page and AI agents, with the evidence for every decision saved and viewable.
  • The model never decides money: Claude judges sameness, and code applies the policy in integer cents.
  • 137 automated tests, including Postgres tests in rolled-back transactions, and a demo anyone can run in a few minutes.

What we learned

Price matching is mostly about saying no correctly: open-box, marketplace sellers, last year's model and one-day glitches. Good evidence matters more than a clever model, and an agent-to-agent negotiation needs a hard line between agreeing a price and paying it.

What's next for Matchpoint

  • Let the owner edit the value-match alternatives from the console, not just the price rules.
  • A labelled evaluation set (bundles, model years, colours, used listings) with published match precision and false-refund rates.
  • A hosted deployment with live Channel3 webhooks, and onboarding for more independent shops.

Note: in the demo, the post-sale price drop is a recorded Channel3 payload replayed with a lower price. It's labelled simulated everywhere it appears, including the PayPal refund note.

Built With

Share this project:

Updates

Submission history