Inspiration

Online electronics shopping has become overwhelming. Consumers are forced to juggle dozens of open browser tabs, decipher convoluted spec sheets, and dodge dark patterns and pushy upsells. Meanwhile, many emerging "AI shopping agents" suffer from severe hallucinations—inventing specs, recommending out-of-stock items, or acting as black boxes with zero transparency into how decisions were made.

We asked: What if an AI shopping assistant didn't just push products, but actually helped you make defensible, informed decisions—and then safely handled checkout with human-in-the-loop approval?

That vision is PayPilot: an autonomous, explainable AI shopping decision and checkout agent built specifically for laptops and consumer electronics, powered by Google Gemini, AG Grid, APIMatic, and the PayPal Developer Sandbox.

What it does

  • Natural Language Shopping Assistant: Describe your needs in plain English (e.g., "I need a coding laptop under ₹75,000 with 16GB RAM and a high-refresh display"). The agent analyzes constraints, asks clarifying questions if needed, and recommends catalog-verified hardware.
  • Transparent "Inspect Agent Reasoning": No black-box recommendations. Users can expand the 5-stage agent reasoning pipeline to inspect query decomposition, constraint extraction, catalog filtering, spec trade-offs, and final score ranking.
  • AG Grid Full Hardware Spec Matrix: A high-performance, interactive data grid displaying verified OEM specifications. Users can sort, filter, quick-search across all attributes, select up to 3 laptops for side-by-side diff comparisons, and export data directly to CSV.
  • Server-Authoritative PayPal Orders v2 Checkout: Complete human-in-the-loop checkout. PayPilot prevents client-side price tampering by calculating authoritative totals strictly on the backend, generating official PayPal Sandbox orders, and verifying capture signatures server-side.
  • Zero-Friction Guest Checkout & Account Claiming: Users can discover and purchase as guests using secure session tokens (x-guest-token), with the ability to create an account and claim past orders seamlessly post-purchase.
  • Developer-First OpenAPI & SDK Architecture: A production OpenAPI 3.0 specification paired with an interactive Scalar developer portal and APIMatic metadata, enabling instant client SDK generation across Python, TypeScript, Go, Java, and C#.

How we built it

PayPilot is built as a production full-stack application designed for cloud deployment:

  • Frontend: React 18, Vite, Tailwind CSS, Lucide Icons, and @paypal/react-paypal-js.
  • Backend: Node.js, Express (ES Modules), MongoDB with Mongoose, and Zod runtime schema validation.
  • AI Intelligence: Google Gemini API with custom prompt pipelines executing 5-stage structured decision validation against an authoritative local catalog.
  • Security & Auth: Salted crypto.scrypt password hashing, timing-safe equality checks, HMAC-SHA256 session tokens, and guest session token isolation.
  • Cloud Infrastructure: Continuous integration and deployment hosted live on Render via a unified render.yaml blueprint.

Sponsor Technologies Used:

  • PayPal: Implemented the official PayPal Orders v2 REST API integration (@paypal/react-paypal-js). All pricing and capture verifications are calculated authoritatively on the server, generating real sandbox capture receipts.
  • AG Grid: Deployed AG Grid Community (v36) with multi-column sorting, quick text filtering, pinned columns, custom cell renderers, responsive adaptors, and one-click exportDataAsCsv.
  • APIMatic: Full OpenAPI 3.0.3 specification (openapi.json) covering all 12 backend endpoints with BearerAuth and GuestTokenAuth, paired with APIMATIC-META.json for multi-language SDK generation (Python, TypeScript, C#, Java, Go) and an interactive Scalar documentation portal at /api/docs.
  • Render: Continuous automated deployment via render.yaml blueprint with single-origin Express SPA production serving.

Challenges we ran into

  • Preventing Price Tampering in Autonomous Flows: Early prototypes let client states calculate order totals. We completely overhauled this into a server-authoritative pattern where PayPal order generation re-queries the database catalog directly, rejecting any mismatched amounts.
  • AG Grid Dynamic Selection in a Hybrid UI: Synchronizing selections between card views, chat recommendations, and the AG Grid table required clean memoization and defensive ID normalization to avoid state thrashing when comparing 3 products.
  • Guest Session Bridging: Allowing users to check out with PayPal without prior registration while ensuring they can later claim those orders securely required a robust guest token lifecycle (x-guest-token) verified on every API boundary.

Accomplishments that we're proud of

  • Genuine End-to-End Sandbox Flow: Real PayPal Sandbox order creation and capture working live in production—producing genuine transaction receipts with real PayPal Order and Capture IDs.
  • Zero Hallucination Guarantee: The AI reasoning pipeline strictly references catalog-verified OEM specifications, eliminating fake specs.
  • Blazing Fast Enterprise Data Grid: Seamless filtering and instant CSV export across complex hardware dimensions powered by AG Grid.
  • Production Deployment: Live, responsive, and publicly accessible on Render with full API documentation.

What we learned

  • How to properly design human-in-the-loop boundaries for agentic commerce so AI assists the decision while the user retains absolute financial control.
  • Best practices for securing PayPal Orders v2 webhooks and capture endpoints against replay attacks and client price spoofing.
  • The power of OpenAPI 3.0 specifications when paired with APIMatic CodeGen to turn an internal API into an autonomous developer ecosystem in minutes.

What's next for PayPilot

  • Automated Price Drop & Restock Webhooks: Allowing users to delegate background monitoring to PayPilot, alerting them when target laptops reach target budgets.
  • Multi-Category Expansion: Extending catalog ingestion beyond laptops to smartphones, PC components, and accessories.
  • One-Click APIMatic SDK Publishing: Automating CI/CD pipelines to publish generated SDK packages directly to npm and PyPI upon OpenAPI spec updates.

Built With

Share this project:

Updates

posted an update —

PayPilot is officially live!

We are thrilled to submit PayPilot for the PayPal AI Hackathon 2026.

Here is what is live and testable right now: Gemini AI Shopping Assistant: Multi-turn conversational recommendations with an open 5-stage reasoning inspector. AG Grid Spec Matrix: High-performance hardware comparison table across 32 verified laptops with CSV export. PayPal Sandbox Checkout: Server-authoritative Orders v2 checkout with real capture receipts. APIMatic OpenAPI Portal: Interactive REST documentation and auto-generated multi-language SDK readiness at /api/docs. Production Cloud: Deployed and running 24/7 on Render.

Try the live app: https://paypilot-ghb5.onrender.com Explore the code: https://github.com/anuragverma025/PayPilot

Submission history