Inspiration
Online payments are essential for modern businesses, but payment-processing issues can create confusion for both merchants and customers.
Imagine a customer successfully pays ₹2,000 through PayPal, but the merchant's website still shows the order as PENDING. Issues like webhook failures, duplicate events, amount mismatches, and refund inconsistencies can lead to delays and manual investigation.
This inspired us to build PAYPAL SENTINEL AI — a platform designed to make payment monitoring, investigation, and recovery smarter, safer, and more transparent.
What it does
PAYPAL SENTINEL AI is an AI-powered payment intelligence, investigation, and recovery platform.
Its core workflow is:
Detect → Investigate → Recover → Verify
Key capabilities include:
- Payment Integrity Detection: Identifies inconsistencies between PayPal transactions and merchant order records.
- AI Investigation Center: Analyses available evidence and explains possible causes of payment issues.
- Webhook Monitoring: Tracks payment events, processing failures, and duplicate notifications.
- Safe Recovery: Recommends controlled corrective actions after validating important conditions.
- Post-Recovery Verification: Rechecks the transaction and order state after a recovery action.
- OCR Payment Proof Verification: Extracts payment information from receipt screenshots for comparison with transaction records.
- Chaos Simulator: Demonstrates common payment-processing failure scenarios in a controlled environment.
How we built it
We designed PAYPAL SENTINEL AI using a modular architecture that combines web technologies, Python-based backend services, database management, and payment integration.
The planned technology stack includes:
- Frontend: HTML, CSS, JavaScript
- Backend: Python and FastAPI
- Database: SQLite and SQLAlchemy
- Payment Integration: PayPal REST API and PayPal Sandbox
- Event Monitoring: PayPal Webhooks
- AI and Analysis: Explainable AI and anomaly detection
- Additional Capabilities: OCR, analytics, and reporting
The Payment Integrity Engine uses deterministic checks for important financial details such as transaction status, amount, and currency. The AI investigation layer helps explain the available evidence rather than independently deciding whether a payment is successful.
Challenges we ran into
One of our biggest challenges was understanding how payment information moves between PayPal and a merchant's internal order-management system.
We also focused on several important technical challenges:
- Understanding REST API integration and webhook communication.
- Identifying duplicate webhook events and preventing repeated processing.
- Comparing payment records with merchant order information.
- Designing safe recovery actions without causing duplicate payments.
- Protecting API credentials and sensitive transaction information.
- Ensuring that AI-generated explanations are based on evidence.
- Distinguishing simulated events from actual PayPal Sandbox events.
Accomplishments that we're proud of
We are proud of designing a unified workflow that goes beyond simply detecting payment errors.
Our key accomplishments include:
- Bringing payment detection and investigation into one platform.
- Designing an evidence-based AI investigation workflow.
- Developing a concept for controlled and verified recovery.
- Including post-recovery verification and audit history.
- Designing a Chaos Simulator for testing payment failure scenarios.
- Combining payment integrity checks, webhook monitoring, and receipt verification in one solution.
Our biggest achievement is our focus on the complete payment issue lifecycle: from identifying a problem to checking whether it has been resolved.
What we learned
Building this project helped us understand the practical role of APIs and webhooks in real-world payment systems.
We learned:
- How REST APIs enable communication between applications.
- How webhooks deliver automatic event notifications.
- How payment reconciliation helps maintain consistent financial records.
- Why webhook signature verification and idempotency are important.
- How AI can support evidence-based technical investigations.
- Why security, authorization, and audit logs are essential in financial applications.
- How to design a modular application that combines multiple technologies.
What's next for PAYPAL SENTINEL AI
Our next goal is to make PAYPAL SENTINEL AI more reliable, intelligent, and useful for real-world merchants.
Future improvements include:
- Complete PayPal Sandbox API integration and testing.
- Reliable background webhook processing with retry support.
- More advanced anomaly detection.
- Improved OCR-based payment verification.
- Enhanced AI investigation with evidence references and confidence indicators.
- More detailed analytics and automated investigation reports.
- Integration with additional payment providers.
- Stronger security, scalability, and production-readiness.
Our vision is to make payment operations more transparent, reliable, and easier to investigate — helping businesses detect issues, understand them, and resolve eligible problems safely.
Built With
- artificial-intelligence
- chart.js
- css
- fastapi
- git
- html
- javascript
- machine-learning
- ocr
- paypal-rest-api
- paypal-sandbox
- python
- sqlalchemy
- sqlite
- webhooks