A Stripe-integrated fraud detection and investigation platform that monitors payment activity, analyzes risk, generates fraud alerts, and provides analyst workflows for investigating suspicious transactions.
PaymentShield demonstrates how modern fintech platforms can securely process payment events while detecting suspicious behavior and supporting fraud investigations.
The platform integrates with Stripe Checkout and Stripe Webhooks, processes real-time payment events, calculates risk scores, generates fraud alerts, and tracks all activity through audit logging and replay-attack protection.
- Stripe Checkout Sessions
- Stripe Payment Processing
- Stripe Webhook Processing
- Secure Webhook Signature Verification
- Large Transaction Detection
- Card Testing Detection
- Risk Scoring Engine
- Real-Time Alert Generation
- Webhook Signature Validation
- Replay Attack Protection
- Audit Logging
- Event Tracking
- OPEN Alerts
- INVESTIGATING Alerts
- RESOLVED Alerts
- Revenue Monitoring
- Payment Monitoring
- Fraud Alert Dashboard
- Risk Score Visualization
+----------------------+
| React UI |
| Fraud Dashboard |
+----------+-----------+
|
v
+----------------------+
| FastAPI API |
+----------+-----------+
|
+---------------------+--------------------+
| | |
v v v
+----------------+ +----------------+ +----------------+
| Stripe Checkout| | Risk Engine | | Audit Logging |
+----------------+ +----------------+ +----------------+
| | |
+---------------------+--------------------+
|
v
+----------------------+
| PostgreSQL |
+----------------------+
Transactions are assigned risk scores based on payment amount.
| Amount | Risk Score |
|---|---|
| < $500 | 0 |
| >= $500 | 25 |
| >= $1000 | 50 |
High-risk transactions generate fraud alerts.
PaymentShield detects potential card-testing attacks by identifying:
- Multiple low-value payments
- Same customer email
- Within a short time window
When detected:
Alert Type: Card Testing
Severity: HIGH
Every Stripe webhook is verified using Stripe's webhook signing secret before processing.
Previously processed Stripe event IDs are stored and checked before processing.
Duplicate events are rejected.
Every webhook event is recorded with:
- Event ID
- Event Type
- Action
- Timestamp
OPEN
↓
INVESTIGATING
↓
RESOLVED
Fraud analysts can investigate and resolve alerts directly through the dashboard.
- React
- Vite
- Axios
- FastAPI
- Python
- PostgreSQL
- SQLAlchemy
- Stripe Checkout
- Stripe Webhooks
- Docker
- Docker Compose
- Ubuntu WSL
- User initiates payment.
- Stripe Checkout processes payment.
- Webhook received.
- Risk score calculated.
- Large Transaction alert generated.
- Alert displayed in dashboard.
- Multiple low-value payments submitted.
- Detection rules triggered.
- Card Testing alert generated.
- Alert displayed in dashboard.
- Analyst investigates and resolves alert.
cd backend
source venv/bin/activate
uvicorn app.main:app --reloadcd frontend
npm install
npm run devdocker compose up -d-
Built a full-stack fraud detection platform using React, FastAPI, PostgreSQL, and Stripe APIs to process real-time payment events, calculate transaction risk scores, and generate analyst-facing fraud alerts.
-
Implemented payment security controls including Stripe webhook signature verification, replay-attack protection, audit logging, and alert investigation workflows for secure event-driven payment monitoring.
- Machine Learning Risk Models
- Device Fingerprinting
- IP Reputation Analysis
- Velocity-Based Fraud Detection
- Analyst Case Management
Samartha Suresh




