-
-
Say "add a black T-Shirt to my cart" and the AI agent searches the catalog and updates your cart.
-
Saying "checkout" makes the agent create a PayPal order and show the Pay with PayPal button.
-
The buyer approves the payment on PayPal (sandbox, Orders API v2).
-
Payment approved and order captured. The whole flow, from speech to paid, runs by voice.
-
Ask "show my cart" and the agent reads back your items and total.
-
Say "remove the item" and the agent updates the cart instantly.
-
Edge case handled: checking out with an empty cart gives a clear message.
-
Edge case handled: unknown products are rejected gracefully instead of failing.
Inspiration
Online shopping still depends on typing, searching and clicking through many screens. That is hard for people with visual or motor impairments, for older users, and for anyone whose hands are busy. We wanted to see if checkout could be as simple as saying what you want.
What it does
VoiceCart is a voice-activated shopping agent built for agentic commerce. You press Speak and say something like "add a black t-shirt to my cart". The agent understands your intent, searches the catalog, updates your cart, and when you say "checkout" it creates a PayPal order. You approve the payment with PayPal and the order is captured. Every reply is shown on screen and read aloud. You can also type commands if you prefer.
How we built it
- The browser converts speech to text with the Web Speech API and sends it to a FastAPI backend.
- An AI agent (Qwen, served through Groq's OpenAI-compatible API) decides which tool to call: search_products, add_to_cart, remove_from_cart, view_cart or checkout.
- On checkout, the backend creates a PayPal order using the PayPal Orders API v2 (sandbox), and the page shows the Pay with PayPal button.
- After the buyer approves, PayPal redirects back and the backend captures the order.
- The app is deployed on Render.
PayPal + AI integration
The AI does not just chat. It makes real decisions through tool calling, and one of those tools triggers a real PayPal order. The language model turns natural speech into structured actions, and PayPal handles secure payment, so the whole path from "I want this" to "paid" is voice-driven.
Challenges we ran into
Getting reliable tool calls from the model, keeping the cart state consistent between voice commands, and handling the PayPal redirect and capture flow on a deployed URL.
Accomplishments that we're proud of
A complete working flow from spoken request to captured PayPal sandbox payment, deployed live with a public open-source repo.
What we learned
How to design an agent with a small, well-defined set of tools, and how to connect an LLM safely to a payment flow so the user always confirms the payment themselves.
What's next
Support for more languages and accents, a larger product catalog, order history, and a fully hands-free confirmation step.
Note for judges
The demo runs on a free server that sleeps when idle, so the first load can take about 50 seconds. Please use Chrome or Edge for voice input. Payments use PayPal sandbox only, so no real money is used. You can also type commands instead of speaking.
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for VoiceCart
Built With
- fastapi
- groq
- html
- javascript
- openai-python-sdk
- paypal-orders-api-v2
- python
- qwen
- uvicorn
- web-speech-api