Inspiration
Payment gateways face a difficult challenge when detecting fraudulent merchants and transactions. When suspicious activity is detected, the usual response is often binary: either release the full settlement or freeze the merchant's funds entirely.
I felt this approach was fundamentally flawed. A legitimate merchant shouldn't have to suffer complete cash-flow disruption because of a potential fraud signal, while payment providers still need strong protection against chargebacks, coordinated fraud rings, and financial losses.
That inspired me to build Docket-Risk, an autonomous, risk-aware settlement and fraud decisioning platform that aims to balance merchant liquidity with payment security.
What it does
Docket-Risk goes beyond traditional fraud scoring. It combines transaction risk intelligence, graph-based fraud detection, and dynamic settlement policies to make more informed decisions.
Some of its core capabilities include:
- ML-powered fraud detection: Uses XGBoost with monotonic constraints to assess transaction and merchant risk.
- Fraud ring detection: Uses graph-based relationship analysis to identify suspicious connections between merchants, devices, payment identifiers, and other shared signals.
- Adaptive settlement reserves: Applies graduated rolling reserves based on risk instead of automatically freezing all merchant funds.
- Risk investigation dashboard: Provides an interface for exploring suspicious activity, understanding risk signals, and investigating connected entities.
- Real-time risk monitoring: Provides live risk updates and operational visibility.
- Immutable audit trail: Uses SHA-256-based integrity verification to make important risk decisions traceable and tamper-evident.
How I built it
I developed Docket-Risk using a full-stack architecture.
The backend is powered by Python and FastAPI, with XGBoost handling machine-learning-based risk scoring. I implemented graph-based relationship detection to identify coordinated suspicious activities that might not be visible when examining transactions individually.
I also focused on temporal feature engineering to avoid data leakage, ensuring that the model uses information available at the time of a decision rather than accidentally learning from future events.
The frontend uses React to provide an interactive risk investigation and settlement management experience. SQLite supports audit and alert persistence, while Docker helps with deployment and reproducibility.
I also built automated tests and evaluation workflows to validate the core risk engine and its decision-making behavior.
Challenges I faced
One of the biggest challenges was detecting coordinated fraud rather than simply identifying suspicious individual transactions. Fraud networks can operate across multiple merchants and reuse devices, phone numbers, payment identifiers, and other shared information.
Another challenge was balancing fraud prevention with merchant liquidity. A highly conservative system can reduce financial risk but also unnecessarily block legitimate businesses.
I also had to address temporal data leakage in machine learning, maintain explainability in risk decisions, and ensure that the settlement policies remained consistent with the underlying risk assessments.
Solving these problems pushed me to think beyond building a model and consider how an entire financial risk management system should behave.
What I learned
Building Docket-Risk taught me that real-world AI systems are not just about model accuracy. They require reliable data pipelines, explainable decisions, robust backend architecture, security, testing, and careful consideration of the people affected by automated decisions.
I gained practical experience in machine learning, graph algorithms, backend engineering, API development, financial risk modelling, and full-stack system design.
Most importantly, I learned how to approach a complex real-world problem from the perspective of both technology and business impact.
Docket-Risk represents my vision of smarter financial infrastructure: protecting payment ecosystems without unnecessarily restricting legitimate businesses.
Built With
- cybersecurity
- data-science
- docker
- explainable-ai
- fastapi
- financial-technology
- fraud-detection
- graph-algorithms
- machine-learning
- postgresql
- python
- react
- real-time
- redis
- rest-api
- risk-management
- scikit-learn
- sqlite
- typescript
- xgboost