Inspiration

Shopping online still means scrolling, comparing and filling forms, and most apps only speak English. We wanted an agent you can simply tell "Under $10 mein best mascara le do", and trust with your money.

What it does

You tell Bazaar AI what you want and your budget, in English, Urdu or Roman Urdu. The agent searches the store, reads the reviews and picks the best value. Then the server checks the real price and your spending limits, and shows an Approve button. You pay through PayPal checkout, get a receipt, and can Undo within 10 minutes for a full refund. The platform keeps a 10% fee and pays sellers the rest through PayPal Payouts after the undo window. An admin page shows sales, fees, payouts and every PayPal event.

How we built it

  • Next.js and TypeScript for the website and the server.
  • One AI agent (Groq, gpt-oss-120b) with 7 tools: search products, read reviews, check the rules, place an order, cancel, list orders and show limits.
  • A rules engine in plain code decides what is allowed. The AI never decides payments, never sets the price and cannot make up a budget.
  • PayPal sandbox: Orders (create and capture) and Refunds through the PayPal Server SDK, Payouts for sellers, webhook signature checking, and order tracking. Saving PayPal for auto-buy (Vault) is built but switched off, because Vault is not enabled on our sandbox app.
  • Supabase Postgres for data, Vercel for hosting, 194 products with reviews as the catalog.
  • We installed the APIMatic Context Plugin for PayPal and followed its TypeScript skills to integrate the PayPal Server SDK.

Challenges

  • Making "an agent that buys for you" safe. The server re-reads the price from the database, only accepts budgets the user typed, and refuses to order unless the user asked to buy.
  • Keeping replies in the user's script, Urdu or Roman Urdu.
  • Staying inside free tiers with rate limits, timeouts and backup keys.

What we learned

Agentic commerce needs guardrails in code, not in prompts. PayPal Orders, Refunds and Payouts fit together well for a marketplace.

What is next

Voice input in Urdu, price watching ("buy when under $8"), and real local sellers.

Built With

Share this project:

Updates

Submission history