Inspiration

Buying for a group means twenty tabs, a spreadsheet called "FINAL v3 (2)", and someone chasing everyone for money. AI agents could do the shopping, but handing one your card is scary. We wanted the AI to do the legwork while a human nod controls every payment.

What it does

Describe what you need in plain English. An AI agent finds real products and builds an editable sheet. Refine it, approve one exact version, and pay with PayPal, in one of three ways:

  • Solo: one PayPal order for the approved total.
  • Group Nod: everyone approves the same version and pays their own share.
  • Community pool: a public link where anyone can chip in through PayPal. It's all or nothing, with automatic refunds.
        "I need…"
            │
            ▼
      Gemini plans
            │
            ▼
   Channel3 searches
            │
            ▼
  Gemini picks + explains
            │
            ▼
     AG Grid sheet
   (edit / "cut 20%")
            │
            ▼
         Nod ✓
            │
            ▼
         PayPal
   ┌────────┼────────┐
   ▼        ▼        ▼
  Solo    Group   Community
                    pool

How we built it

PayPal developer platform (Sandbox, REST APIs)

  • OAuth 2.0 (POST /v1/oauth2/token): signs Nod's server in with client credentials.
  • Orders v2 create (POST /v2/checkout/orders): intent: CAPTURE, every product as a line item, and an item_total equal to the approved total. One order per solo buyer, per Group Nod member, or per pool donor.
  • PayPal checkout: buyers approve on PayPal's site through the payer-action link and are sent back to Nod. Pool donors pay as guests.
  • Orders v2 capture (POST /v2/checkout/orders/{id}/capture): captures the payment. The amount and currency must match the approved total before anything is marked paid.
  • Orders v2 get order (GET /v2/checkout/orders/{id}): recovers safely if a capture is retried.
  • Payments v2 refund (POST /v2/payments/captures/{id}/refund): refunds paid shares when a group payment is cancelled, and every donor when a pool is cancelled or expires.
  • Idempotency keys (PayPal-Request-Id) on every create, capture and refund, so nothing is charged or refunded twice.

How refunds work

  • Group: the owner cancels, and each captured share is refunded through PayPal before the sheet reopens.
  • Community pool: cancelling it, or the deadline passing (a background job checks every minute), refunds every donor. If one refund fails, the pool stays open and a retry only touches what's still unrefunded.

AI: Google Gemini (gemini-2.5-flash, via the Gemini API)

  • Plan: reads the request, budget and current sheet, then decides what to keep and what to search for.
  • Search: Nod runs those searches on Channel3 in parallel, up to 6 real products per need.
  • Select: Gemini picks one product per need, stays in budget, and writes a short "why this pick".
  • Revise: applies requests like "cut 20%" or "upgrade quality" as a new version.
  • Pool pitch: turns the organiser's note into a public appeal.
  • Guardrails: every response is structured JSON checked with Zod, with one retry. Only product IDs from the search are accepted, and every price is looked up again on the server.

Sponsor tools

  • Channel3: live product search and lookup, so every product, price, stock level and retailer link is real.
  • AG Grid: the editable sheet (changed cells flash), the version compare grid, the read-only pool page and the My requests list.
  • Postman: for testing the REST API and the PayPal sandbox calls.
  • Render: hosts the API and the React app as one web service.

Stack: MongoDB Atlas + Mongoose, Express 5, Node.js, React 19 + Vite, TanStack Query and TypeScript throughout, with Zod validation, Helmet, rate limits and JWT auth in httpOnly cookies. Money is stored in whole cents, and a revision number on each version rejects stale edits.

Challenges we ran into

  • Keeping the AI away from money: it only suggests products, and code sets every price.
  • Making sure "what you approve is what you pay", even with several people editing at once.
  • All-or-nothing refunds that stay safe if a single refund fails.

Accomplishments that we're proud of

  • Real sandbox payments, group splits and refunds working end to end.
  • One approved sheet that can be paid for three different ways.

AG Grid: the heart of the product

  • One grid powers four screens: the editable sheet, the version compare, the public pool page and the My requests list.
  • Cell flashing shows exactly which cells the AI changed after "cut 20%", so the agent's work is transparent at a glance.
  • The compare grid shows before → after quantities and prices, with a net-change row.

Channel3: real products, real prices

  • Every item the agent suggests is a live product from a real retailer, with its price, stock, rating and buy link.
  • Prices are looked up again on the server before saving, so the AI can never invent a product or a price.
  • Searches run in parallel, are cached for 15 minutes and capped per user per day, so the agent stays fast and cheap.

What we learned

Agentic commerce is mostly a trust problem. Approvals, versions and verified PayPal captures are what make an AI safe to put near a payment.

What's next for Nod

PayPal Payouts so a funded pool can pay a school or charity directly, webhooks and payment reminders, real retailer checkout, and recurring pools for nonprofits.

Built With

Share this project:

Updates

Submission history