Inspiration

Online shopping is broken. Users spend hours searching, comparing prices across multiple tabs, and filling out checkout forms. We asked ourselves: What if you could just tell an AI what you need, and it handles everything from search to payment?

PayPilot AI was born from this vision — an autonomous shopping agent that turns a simple conversation into a complete purchase.

What it does

PayPilot AI is an AI-powered shopping assistant that:

  1. Understands your request in natural language (e.g., "Find me a laptop under $1500 for programming")
  2. Searches products in a real MySQL database (44 real products from DummyJSON)
  3. Compares options and recommends the best one
  4. Adds the product to your cart
  5. Creates an order
  6. Generates a secure PayPal payment link
  7. *Completes*the payment via PayPal Sandbox

This is Agentic Commerce — not just a chatbot, but an AI agent that takes real actions.

How we built it

Architecture:

  • Frontend: Angular 22 (chat interface, product cards, PayPal button)
  • Backend: Spring Boot 4.1 + MySQL (REST APIs, PayPal v2 integration)
  • AI Service: Python + FastAPI + LangGraph + Groq (LLM, tool calling)
  • PayPal: Sandbox API v2 (OAuth2, Orders, Capture)

AI Tools implemented:

  • search_products(category, maxPrice)
  • add_to_cart(productId, quantity)
  • create_order()
  • create_paypal_order(orderId)
  • get_cart_summary()

Security:

  • The AI never sets the amount — the backend recomputes it from the DB
  • OAuth2 token caching
  • Idempotency headers on PayPal calls
  • Strict amount + currency verification on capture

Challenges we ran into

  • Infinite JSON recursion between Cart → CartItem → Cart (solved with @JsonIgnore)
  • Duplicate cart items (solved with merge logic)
  • PayPal OAuth2 integration with secure token caching
  • CORS configuration between Angular, Spring Boot, and FastAPI
  • Angular change detection with async axios calls (solved with ChangeDetectorRef)
  • Groq model deprecation — had to switch models multiple times

🏆 Accomplishments we're proud of

  • Built a fully functional end-to-end flow from AI chat to PayPal payment
  • Integrated 4 technologies (Angular, Spring Boot, Python, MySQL) in one system
  • Implemented real agentic behavior with tool calling
  • Successfully integrated PayPal Orders API v2 with OAuth2
  • Designed a professional UI inspired by PayPal's brand (Navy & Gold)

What we learned

  • How to build an agentic AI system that takes real-world actions
  • PayPal API v2 integration (auth, orders, capture)
  • Designing multi-service architectures with clean separation
  • The importance of security when AI is involved (never trust the LLM with prices)

What's next for PayPilot AI

  • Voice input for hands-free shopping
  • Personalized recommendations from order history
  • Multi-language support (Arabic, French, English)
  • Production PayPal integration (currently Sandbox)
  • Admin dashboard with analytics

Built With

Share this project:

Updates

Submission history