PaySentry
Jan 2025 — Present
Overview
Every fraudulent transaction that slips through costs money and trust. PaySentry catches suspicious payments in under 100ms using ML-powered risk scoring — fast enough to block fraud in real time without slowing down legitimate transactions.
Incoming transactions flow through a multi-layered risk pipeline that combines rule-based checks with ML anomaly detection. The system is built for integration into live payment gateways where every millisecond counts, and includes automated compliance reporting to keep up with financial regulations.
Key Features
- Real-time transaction scoring with sub-100ms response times
- XGBoost fraud detection model trained on 500K+ synthetic transactions
- Automated compliance reports that adapt to different regulatory requirements
- Interactive analytics dashboard for visualizing fraud patterns and trends
- Redis caching layer for high-throughput transaction processing
- Configurable risk thresholds with multi-level alert escalation
How It's Built
PaySentry is structured as a layered microservice pipeline:
- Ingestion: FastAPI endpoints receive transaction payloads, validate schemas, and push events into a Celery task queue for asynchronous processing
- Feature Engine: Pandas and NumPy compute real-time features — rolling averages, velocity checks, geo-distance anomalies — from raw transaction data and cached user profiles in Redis
- Scoring: An XGBoost model trained on 500K+ synthetic transactions evaluates feature vectors and returns fraud probability with confidence intervals
- Decision Engine: Rule-based post-processing applies regulatory thresholds, triggers alerts, and generates compliance reports in PostgreSQL
Interesting Challenges
- Class Imbalance: Fraud makes up less than 1% of transactions. SMOTE oversampling combined with cost-sensitive learning boosts minority-class recall without sacrificing precision
- Cold-Start Problem: New users have no transaction history to score against. A fallback rule engine using device fingerprinting and geo-IP heuristics covers the gap until enough behavioral data accumulates
- Regulatory Complexity: Financial regulations vary by jurisdiction. A pluggable rules framework lets compliance logic be defined as configuration rather than hardcoded business logic