-
-
PayPal Synapse — AI-powered commerce dashboard featuring XGBoost demand forecasting, LangGraph AI agents, and PayPal Sandbox integration.
-
Inventory management dashboard for monitoring product availability, stock levels, and replenishment needs.
-
Live inventory data retrieved from the FastAPI backend, showing product details, stock quantities, and reorder thresholds.
-
XGBoost-powered demand forecasting dashboard for predicting future product demand using historical sales data.
-
Machine learning forecast predicting approximately 21.88 units of next-day demand to support proactive inventory planning.
-
AI-powered digital twin dashboard for simulating demand changes, inventory risks, and potential business disruptions.
-
Digital twin visualization comparing projected demand, available inventory, and potential stock shortages.
-
Detailed simulation results showing projected inventory shortages under increased demand scenarios.
-
AI-powered procurement dashboard for optimizing supplier selection, purchasing quantities, and budget allocation.
-
Procurement optimization results showing recommended suppliers, purchase quantities, and estimated purchasing costs.
-
LangGraph-powered AI agent dashboard coordinating forecasting, simulation, and procurement workflows.
-
Multi-agent workflow showing coordinated AI decision-making with human approval safeguards.
-
PayPal Sandbox payment dashboard supporting human-approved purchases, checkout management, and transaction tracking.
-
PayPal Sandbox checkout status and payment tracking, demonstrating the secure purchase approval workflow.
-
Advanced AI dashboard featuring Monte Carlo simulation, explainable AI, graph-based analysis, and model evaluation.
Inspiration
Every merchant faces uncertainty. Sudden demand spikes, inventory shortages, supplier delays, and unexpected disruptions can lead to lost revenue and inefficient purchasing decisions. Traditional business dashboards explain what happened yesterday, but rarely help merchants prepare for tomorrow.
We built PayPal Synapse to answer one question: What if merchants could predict future demand, simulate business disruptions, identify the best procurement decisions, and securely execute purchases through PayPal, all from one intelligent platform?
Our inspiration was to combine artificial intelligence, digital twin technology, and PayPal’s payment infrastructure to transform reactive commerce into proactive, data-driven decision-making.
What it does
PayPal Synapse is an AI-powered autonomous commerce digital twin that helps merchants predict demand, simulate disruptions, optimize procurement, coordinate AI agents, and execute human-approved PayPal payments.
The platform includes seven major capabilities:
- Demand Forecasting: Uses XGBoost machine learning to forecast future product demand from historical sales data.
- Inventory Intelligence: Helps merchants monitor inventory levels and identify potential stock shortages.
- Digital Twin Simulation: Simulates different demand scenarios and business disruptions to evaluate possible outcomes.
- Procurement Optimization: Supports intelligent purchasing decisions based on inventory requirements and demand predictions.
- AI Agent Orchestration: Uses LangGraph-based workflows to coordinate intelligent commerce operations.
- PayPal Payment Integration: Connects procurement approvals with PayPal Sandbox order creation, buyer authorization, and secure payment capture.
- Advanced AI Analytics: Provides probabilistic scenario analysis and forecasting backtesting to support data-driven decisions.
The system is designed to help merchants move from identifying problems to evaluating and executing solutions, while maintaining human oversight over financial transactions.
How we built it
We developed PayPal Synapse as a modular full-stack AI application.
Frontend: Built an interactive merchant dashboard using React, JavaScript, and Vite. The dashboard includes Overview, Inventory, Demand Forecast, Digital Twin, Procurement, AI Agents, PayPal Payments, and Advanced AI sections.
Backend: Developed REST API services using Python and FastAPI to connect the frontend with machine learning models, simulation engines, procurement workflows, and payment services.
Machine Learning: Implemented XGBoost-based demand forecasting using pandas, NumPy, and scikit-learn. Historical sales data and time-related features support future demand predictions.
Digital Twin: Developed simulation capabilities for exploring demand fluctuations, potential inventory shortages, and business disruption scenarios.
Procurement Optimization: Connected inventory requirements and demand predictions with procurement decision-support workflows.
AI Agents: Incorporated LangGraph to support structured AI agent orchestration and coordination across commerce intelligence components.
Database: Used SQLite and SQLAlchemy to manage application data, procurement approvals, PayPal order identifiers, and transaction states.
PayPal Integration: Integrated PayPal Sandbox REST APIs to support order creation, buyer approval, payment capture, idempotency, transaction status tracking, and checkout recovery guidance.
We successfully demonstrated a $390 PayPal Sandbox transaction. The payment was approved and captured, and the backend recorded the transaction as completed.
Testing: Used pytest to validate backend functionality, achieving 36 passing automated tests. We also manually verified the PayPal Sandbox checkout and payment capture workflow.
Challenges we ran into
One of our biggest challenges was connecting predictive machine learning with actionable commerce workflows. Building a forecasting model was only the beginning; we needed to connect predictions with inventory intelligence, simulation, procurement, and payment execution.
Another major challenge was implementing PayPal Sandbox payments securely. We needed to distinguish between order creation, buyer approval, payment capture, and completed transactions.
We also had to address duplicate payment risks, uncertain API outcomes, and transaction recovery. To improve reliability, we implemented persistent PayPal request identifiers, checkout state tracking, and recovery guidance.
Integrating React, FastAPI, machine learning, simulation, SQLAlchemy, LangGraph, and PayPal APIs into one application required careful system design and debugging.
Finally, validating the end-to-end payment workflow was challenging because successful order creation does not automatically mean a payment has been completed. We tested each stage independently before verifying successful Sandbox payment capture.
Accomplishments that we’re proud of
We are proud of building an AI-powered commerce platform that connects predictive intelligence with real PayPal Sandbox payment workflows.
Our key accomplishments include:
- Developed a full-stack AI-powered commerce digital twin prototype.
- Implemented XGBoost-based demand forecasting.
- Built inventory intelligence and digital twin simulation capabilities.
- Developed procurement decision-support workflows.
- Incorporated LangGraph-based AI agent orchestration.
- Created an interactive React merchant dashboard.
- Integrated PayPal Sandbox REST APIs.
- Successfully created, approved, and captured a $390 Sandbox payment.
- Implemented human confirmation before payment capture.
- Added payment idempotency support and checkout recovery guidance.
- Achieved 36 passing automated backend tests.
- Built a modular architecture that can be extended with more advanced AI capabilities.
Our biggest achievement was demonstrating how AI-generated business intelligence can connect with human-approved financial execution through PayPal.
What we learned
Building PayPal Synapse taught us that developing an intelligent commerce platform requires more than machine learning accuracy. We learned how to design and integrate forecasting models, simulation engines, backend APIs, databases, AI orchestration workflows, and payment infrastructure. We gained hands-on experience with XGBoost, FastAPI, React, LangGraph, SQLAlchemy, SQLite, PayPal Sandbox APIs, and automated testing. We also learned the importance of transaction safety, payment idempotency, database consistency, and human oversight when connecting AI recommendations with financial operations. One of our most important takeaways was that responsible AI should help people make better decisions without removing their control over critical financial actions. This project strengthened our understanding of full-stack AI engineering, machine learning integration, payment systems, and intelligent business automation.
What’s next for PayPal Synapse - AI-Powered Commerce Digital Twin
Our vision is to evolve PayPal Synapse into a more advanced AI-powered commerce intelligence platform.
Future improvements include:
- Advanced Forecasting: Explore additional machine learning architectures, larger datasets, and improved forecasting accuracy.
- Enhanced Digital Twin: Add richer simulations for supplier delays, inventory disruptions, and changing market conditions.
- Smarter Procurement: Expand supplier comparisons using cost, delivery reliability, and lead-time optimization.
- Autonomous AI Agents: Extend LangGraph workflows with more sophisticated multi-agent collaboration while retaining human approval for payments.
- Payment Intelligence: Improve PayPal transaction monitoring, reconciliation, and recovery mechanisms.
- Cloud Deployment: Explore scalable cloud infrastructure and production-ready database systems.
- Advanced Analytics: Introduce richer visualizations, business performance insights, and scenario comparison tools. Our long-term goal is to help merchants anticipate problems before they occur, make intelligent procurement decisions, and securely connect those decisions with PayPal payment infrastructure. PayPal Synapse represents our vision for the future of commerce: predictive, intelligent, resilient, and human-controlled. Built for the PayPal AI Hackathon 2026.
Built With
- ai-agents
- digital-twin
- fastapi
- github
- javascript
- langgraph
- machine-learning
- numpy
- pandas
- paypal-rest-api
- paypal-sandbox
- pytest
- python
- react
- scikit-learn
- sqlalchemy
- sqlite
- vite
- xgboost