Inspiration
Online shopping still means endless tabs, filters, and comparison. AI agents can research products, but nobody trusts them with real money. We wanted to show a safe pattern for agentic commerce: the AI does the hard work of understanding needs and finding products, while PayPal handles the payment and a hard server-side budget guardrail ensures the AI can never overspend.What it does
PayAgent is an AI shopping agent that: Asks a few smart multiple-choice questions about your needs, budget, and preferences Searches real online stores (via Channel3) Ranks the top 3 products with clear reasons why each fits you Lets you check out securely with PayPal (Sandbox) Supports order status checks and one-click refunds Enforces a monthly budget limit on the server so neither the AI nor a mis-click can overspend The core flow is: AI proposes → Human approves in PayPal → Server captures.How we built it
Built with a zero-dependency Node.js server and a clean single-page frontend.
We used PayPal Orders v2 (create + capture) and Payments API (refunds), an OpenAI-compatible AI model for question generation, ranking, and a tool-calling chat agent, Channel3 for live product search, and AG Grid for the orders dashboard. The budget guardrail is enforced entirely on the server — not in the prompt.Challenges we ran into
Making the AI safe with money was the biggest challenge. We solved it by putting the budget check in server code instead of relying on the model. Handling the full PayPal redirect → capture → refund flow cleanly, and making the experience work even without AI or Channel3 keys (via fallbacks), also took careful design.Accomplishments that we're proud of A complete working loop: guided questions → live products → PayPal checkout → capture → status → refund A hard server-side budget guardrail that the AI cannot bypass Clean UI with product cards, match scores, and an AG Grid orders dashboard Graceful fallbacks so judges can always test the full PayPal flow What we learned
When money is involved, guardrails must live outside the model. Tool design and server-side enforcement matter more than clever prompting. Building a reliable PayPal sandbox flow (create → approve → capture → refund) taught us a lot about real payment state management.What's next for PayAgent Real merchant checkout handoff and affiliate links Per-agent spending policies and approval rules Multi-currency support Better order persistence and user accounts
Built With
- ag
- ai
- api
- channel3
- claude
- grid
- groq
- javascript
- node.js
- openai-compatible
- payments
- render
- sandbox
- v2