Inspiration

Checkout still starts with a cart you assemble by hand: search, click, count, repeat. Language models made "just say what you want" a normal interface for everything except paying. We wanted the sentence to reach all the way to a real payment — not a mock checkout.

What it does

SayToPay takes one natural-language sentence (for example, "2 coffee beans and a notebook"), converts it into a structured order draft with items, quantities, and a total, lets the buyer review and edit the draft, and then completes a real PayPal sandbox payment through the Orders flow: create order → buyer approval → capture. The server reprices the draft from the catalog before payment, so client-supplied prices are never trusted. On return from approval the app looks the order up before capturing, so refreshing never captures twice. Demo transaction (sandbox): order ID 95926953LT7119902, capture ID 6TL39670T1051554P, amount $45.50 USD, status COMPLETED.

How we built it

A single AI step at the front turns the sentence into items and quantities (a provider-neutral LLM client when a key is configured, otherwise a built-in deterministic parser; the model returns only SKUs and quantities and the server prices everything from the catalog). PayPal integration is the center: OAuth token, create order with the draft's line items, and capture after buyer approval, against api-m.sandbox.paypal.com. Dependency-free Node.js server and single-page UI, runnable with npm start. Tests: 157 passing.

Built during the hackathon

All of SayToPay — parser, PayPal client, server, UI, and tests — was built during the hackathon period for this submission. No pre-existing project code was reused.

Challenges

Keeping the language step honest — a longer product name ("notebook") must not also match a shorter one ("book"), and the app fails explicitly (paypal_credentials_missing) instead of pretending a payment happened when credentials are absent.

Accomplishments

One sentence becomes a reviewable, server-repriced order draft and a real PayPal sandbox order, captured end to end, with zero installed dependencies.

What we learned

The hard part of agentic commerce is not the language step; it is keeping a reviewable, auditable draft between the sentence and the money.

What's next

Widen the catalog, let the model ask a clarifying question when a sentence is ambiguous, and add a spoken confirmation summary before approval.

Built With

  • anthropic
  • api
  • gemini
  • html/css/javascript
  • llm-api
  • node.js
  • openai
  • openai-compatible
  • orders
  • paypal
  • sandbox
  • v2
Share this project:

Updates

Submission history