PayPilot AI – Intelligent Shopping & Payments

Inspiration

Online shopping offers thousands of products, but finding the right product, comparing options, and completing a purchase can still be time-consuming. Many shopping platforms provide product filters and recommendations, but they don't always offer a natural, conversational shopping experience.

This inspired us to build PayPilot AI, an AI-powered shopping platform that combines intelligent product discovery, conversational assistance, and secure payment processing into one experience.

Our goal was to make online shopping simpler, smarter, and more interactive by allowing users to discover products and get shopping assistance through an AI-powered interface while completing purchases through PayPal.

What is PayPilot AI?

PayPilot AI is an intelligent shopping and payment platform that brings together AI assistance and digital commerce.

The platform enables users to:

  • Discover Products: Browse available products and explore product details, specifications, and prices.
  • AI Shopping Assistant: Interact with a conversational AI assistant to ask product-related questions and receive shopping guidance.
  • Smart Product Discovery: Find relevant products using conversational queries and product search capabilities.
  • PayPal Integration: Create PayPal Sandbox orders, approve payments, and capture transactions through the PayPal Checkout API.
  • Payment Verification: Verify completed transactions with PayPal before generating payment confirmations.
  • Transaction History: Retrieve payment records, including order IDs, capture IDs, product information, amounts, and transaction statuses.
  • Responsive Interface: Access the shopping experience through a modern web application.

How We Built It

We developed PayPilot AI using a full-stack architecture with a separate frontend and backend.

Frontend

  • Next.js and React for the interactive user interface.
  • TypeScript for structured and maintainable code.
  • Tailwind CSS for responsive styling.
  • Fetch API for communication with the backend services.

Backend

  • Python and FastAPI for REST API development.
  • SQLAlchemy for database operations and transaction management.
  • PostgreSQL for deployed payment records.
  • SQLite for local development and testing.

AI Integration

  • Conversational AI capabilities for shopping assistance.
  • LangChain and LangGraph for AI application and agent workflows.
  • Google Gemini and Ollama integrations for language-model-based functionality.

PayPal Integration

We integrated the PayPal Sandbox REST API to implement the payment lifecycle:

  1. The customer selects a product and initiates checkout.
  2. The backend calculates the purchase amount and creates a PayPal order.
  3. The customer is redirected to PayPal to approve the transaction.
  4. PayPal redirects the customer back to the application.
  5. The backend retrieves and verifies the order with PayPal.
  6. The backend captures the approved payment and records the transaction.
  7. The payment history API provides access to saved transaction details.

We also implemented webhook handling to support payment-event verification and transaction-status updates.

Deployment

  • Frontend: Vercel
  • Backend: Render
  • Database: Render PostgreSQL
  • Payment environment: PayPal Sandbox

Challenges We Faced

Building PayPilot AI involved several practical development and integration challenges.

1. Integrating AI with E-commerce

Connecting conversational AI capabilities with product information required designing an interaction between the shopping interface, backend APIs, and AI services.

2. PayPal Payment Lifecycle

Implementing order creation, buyer approval, payment capture, and transaction verification required understanding the PayPal Checkout API and handling different payment states.

3. Database Management

We initially used SQLite for local development and later configured PostgreSQL for deployment. Managing separate local and production databases highlighted the importance of consistent database configuration and transaction persistence.

4. Frontend and Backend Deployment

Deploying the frontend and backend separately introduced challenges involving environment variables, API URLs, CORS configuration, and production checkout redirects. We addressed these issues by configuring the production frontend origin and backend endpoints.

5. Reliable Payment Handling

We implemented order-based duplicate protection and payment verification to avoid unnecessary repeated captures and to maintain consistent transaction records.

What We Learned

Through this project, we gained practical experience in:

  • Building AI-powered applications using modern full-stack technologies.
  • Integrating conversational AI into an e-commerce workflow.
  • Working with PayPal Sandbox APIs and the payment lifecycle.
  • Designing REST APIs using FastAPI.
  • Managing relational databases using SQLAlchemy and PostgreSQL.
  • Handling webhooks and transaction verification.
  • Deploying frontend and backend services independently.
  • Debugging real-world integration issues involving CORS, environment variables, and payment redirects.

Future Improvements

We envision extending PayPilot AI with:

  • More personalized AI-driven product recommendations.
  • Improved multi-agent shopping workflows.
  • Advanced product comparison and price analysis.
  • Enhanced transaction analytics and spending insights.
  • Additional payment methods and production-ready payment infrastructure.

Conclusion

PayPilot AI aims to make online shopping more intelligent, conversational, and convenient.

By bringing together AI-powered shopping assistance and PayPal payment integration, we demonstrate how AI can improve the customer shopping journey while connecting intelligent product discovery with digital commerce.

Our project represents a step toward a smarter shopping experience where users can discover, understand, and purchase products through one integrated platform.

Built With

Share this project:

Updates

Submission history