Inspiration

I've built literacy resources for visually impaired teenagers, and I kept seeing how much of the web assumes you can see it. Online checkout is one of the worst cases: long pages, popups, totals that change, and at the most important moment, paying, you're sent to another site to find an "Approve" button.

Voice assistants can fill a cart, but most still hand you to a visual payment page at the end, or pay without telling you exactly what you're paying for. I wanted a checkout a blind shopper could actually trust: you hear exactly what you're buying and what it costs, and money moves only when you clearly say yes.

What it does

EchoCart is a voice checkout that any shop can add to its own website with one script tag. In the demo, it runs inside a pharmacy's site:

  • Press one button (or Space) and speak: "I need ibuprofen and a nasal spray."
  • EchoCart reads the cart back: items, quantities, the total in euros and the delivery date, then asks "Say yes to pay, or tell me what to change."
  • Change anything by voice: "make the ibuprofen two packs". Every change is read back and needs a new yes.
  • Say yes and PayPal is charged. EchoCart speaks the receipt, and the shop's own basket and order confirmation update on the page.
  • Refund by voice: "refund just the ibuprofen" reads back the amount, waits for a yes, and refunds that part of the order through PayPal.
  • Also: "same as last time", "where's my order?", product questions, a spending limit set by voice, and "unlink my PayPal".
  • An optional PIN, typed and never spoken, so someone else in the room can't pay by saying yes.

You link PayPal once, in a popup EchoCart talks you through. After that, checkout is entirely by voice.

How I built it

PayPal (sandbox only; the app refuses to start against any other API base URL):

  • Vault v3: the shopper approves a setup token once and it becomes a saved payment token. This removes the approval page from every later purchase.
  • Orders v2: each purchase is created with payment_source.paypal.vault_id and intent: CAPTURE, and comes back COMPLETED with no approval page.
  • Payments v2: full and partial refunds. For a partial refund, each line's share is computed and the last refund takes the exact remainder, so the refunds $r_1, \dots, r_n$ always add up to the charge $C$: $\sum_i r_i = C$, never more because of rounding.
  • Vault delete when the shopper says "unlink my PayPal", and a popup fallback for sandbox apps without Vault.

AI (Claude) picks products, never prices. Claude turns the shopper's words into JSON through a JSON schema: an action, product ids, quantities and an optional budget. The backend rejects anything that breaks the schema, names an unknown product, exceeds stock or goes over budget. Every price, total, refund and receipt is computed and worded by the backend. An offline keyword parser lets anyone run it without an API key.

On a shop's own website. A shop adds embed.js. EchoCart keeps running on its own address and reads the shop's product feed (Shopify-style products.json). A frame-ancestors header means only the shop's listed sites can show it, and messages go only to that shop's page.

Stack: Python 3.12, FastAPI, httpx and pydantic; plain HTML, CSS and JavaScript; the Web Speech API for recognition and speech; Web Audio for the earcons; Docker Compose; hosted on Render. Everything is covered by 130 automated tests.

Challenges I ran into

  • The approval page. Standard PayPal checkout sends the buyer to a visual login and approval page, which breaks a voice-only flow. Vaulting a PayPal account for returning buyers solved it. I proved it on the real sandbox with a standalone script before building on it.
  • What counts as "yes". People say "yeah, go ahead" and "sure", so EchoCart accepts those. But "yeah, wait" or "yes, but take out the coffee" must not pay. A yes counts only straight after the exact total is spoken, it's tied to a fingerprint of that cart, and it works once.
  • PayPal not answering. In one sandbox run, an order took over 30 seconds. EchoCart now says it can't tell yet instead of claiming nothing happened, and a retry reuses the same PayPal request id, so the shopper is never charged twice.
  • Popups from voice commands. Browsers block popups that aren't triggered by a user gesture. EchoCart says "press Enter" and moves the focus to the right button, so the key press opens the PayPal window.
  • One currency. I first priced in Romanian lei and charged in euros. Hearing every total twice made read-backs hard to follow, so the shop now prices in euros only.

Accomplishments that I'm proud of

  • A complete purchase, edit and refund with the screen off, on real PayPal sandbox APIs.
  • Safety rules that are tested code, not prompt text. The AI can't invent a price.
  • A real merchant integration: one script tag on the shop's own site, locked to that shop.
  • Accessibility from the start: live regions, earcons with vibration, a "let my screen reader speak" mode, no timeouts, and WCAG 2.2 AA contrast in light and dark mode.

What I learned

  • Designing for speech means designing sentences: what comes first, money said the way people say it ("9 euros 47 cents"), and when to stay quiet.
  • aria-live regions need care: a repeated message has to be cleared and rewritten, or screen readers stay silent.
  • Trust comes from what the system can't do. Keeping all money in the backend made the AI part safe to use.

What's next for EchoCart

  • Testing with blind and low-vision shoppers, and changing the wording and pacing based on what they tell me.
  • More shop platforms (WooCommerce, Google Merchant Center), live stock and delivery slots.
  • Passkeys as an alternative to the PIN, and an optional second confirmation by a trusted contact above a set amount.
  • Real delivery tracking through PayPal's shipment tracking API.
  • A phone-call channel, so shoppers can use it without a browser at all.

Built With

Share this project:

Updates

Submission history