About PayPilot AI

Inspiration

Online shopping often involves more than simply finding a product and clicking checkout. Buyers need to compare options, stay within a budget, understand whether a product actually meets their requirements, and trust that their payment will be processed correctly.

We wanted to bring these decisions together into one intelligent commerce experience.

That idea led to PayPilot AI — an AI-assisted purchasing and payment platform that combines a verified product catalog, intelligent shopping recommendations, and secure PayPal-powered checkout. Our vision was to make purchasing more informed, convenient, and reliable without sacrificing transparency or user control.

What We Built

PayPilot AI brings together three core capabilities:

  • Intelligent Purchasing Assistant: Users can describe their requirements in natural language. The assistant interprets their intent and generates product recommendations grounded in the actual catalog, available inventory, and authoritative prices. It also helps users evaluate their selections against a budget.
  • Secure Commerce and Payments: The platform integrates PayPal Orders v2 for checkout, with server-side price validation, payment verification, idempotency protection, and transaction auditing.
  • Reliable Inventory and Order Management: Orders, payment states, and inventory movements are tracked through a persistent database. Duplicate requests and repeated capture attempts are handled through safeguards designed to prevent duplicate orders and inventory deductions.

The AI assistant remains advisory: users retain control over their cart and must explicitly proceed through checkout.

How We Built It

We developed PayPilot AI using a full-stack architecture:

  • Frontend: React, TypeScript, Vite, and Tailwind CSS.
  • Backend: Python, FastAPI, and Pydantic.
  • Database: SQLite with SQLAlchemy 2.x.
  • Payments: PayPal Orders v2 REST API and PayPal JavaScript SDK.
  • AI: Google's Gemini API through a modular provider architecture, alongside a deterministic mock provider for testing.

One of our important engineering decisions was to keep product and payment data authoritative on the backend. The assistant does not invent product availability or determine final prices. Its recommendations are validated against the actual catalog before being returned.

For payment reliability, we implemented client-side idempotency keys, server-side capture verification, an inventory movement ledger, and recovery logic for interrupted payment operations. We also introduced automated tests using mocked payment and AI providers to simulate failure scenarios without creating unnecessary transactions.

Challenges We Faced

The most challenging part was not integrating an AI model or rendering a payment button. It was making the different parts of the system work together reliably.

1. Preventing duplicate transactions: Network retries and repeated requests can create duplicate orders. We introduced idempotency keys, payload fingerprinting, and database-level uniqueness constraints to ensure that retries of the same checkout do not create additional orders.

2. Handling interrupted payments: A network timeout does not necessarily mean a payment failed. PayPal may have completed the capture even when the application did not receive the response. We implemented a recoverable payment state and upstream reconciliation so the backend can verify the actual PayPal order status before finalizing local records.

3. Maintaining inventory consistency: Payment completion, stock deduction, and inventory audit records must remain consistent. We strengthened transaction handling and added an append-only inventory movement ledger to prevent duplicate deductions.

4. Grounding AI recommendations: Natural-language models can produce inaccurate product suggestions. We addressed this by validating recommendations against the actual catalog, authoritative prices, and available stock, while filtering unsupported product identifiers.

5. Testing without risking real transactions: We needed to verify failure scenarios without repeatedly creating payments. Deterministic mocks and isolated database fixtures allowed us to test concurrency, timeouts, reconciliation, and rollback behavior safely.

What We Learned

Building PayPilot AI taught us that a useful AI-powered product requires much more than connecting an LLM to a frontend.

We learned how to design modular AI provider integrations, ground model outputs in authoritative application data, integrate payment APIs, implement idempotent operations, handle distributed-system failure scenarios, and maintain consistency across database transactions.

Most importantly, we learned that trust is a fundamental part of intelligent commerce. AI can help users make better purchasing decisions, but secure payments, transparent recommendations, reliable data, and user control are what make the experience dependable.

What's Next

We envision PayPilot AI evolving into a more comprehensive intelligent purchasing platform, with improved personalization, smarter product comparisons, richer budget-aware recommendations, and more automated payment reconciliation.

Our goal is simple: make purchasing smarter without making it less transparent or less secure.

PayPilot AI — Shop smarter. Decide better. Pay securely.

Built With

  • ai-powered-shopping
  • artificial-intelligence
  • e-commerce
  • fastapi
  • fintech
  • full-stack
  • gemini-api
  • generative-ai
  • google-ai
  • idempotency
  • intelligent-automation
  • inventory-management
  • payment-integration
  • payment-security
  • paypal
  • paypal-orders-api
  • python
  • react
  • rest-api
  • sqlalchemy
  • sqlite
  • tailwind-css
  • transaction-management
  • typescript
  • vite
Share this project:

Updates

Submission history