Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

TonnieD/Mpesa-Fraud-Detection-System

Domain:

socioeconomic

Record type:

softwaremodel
Creator:
Ton
Host:
Using Machine Learning to identify and prevent fraudulent transactions # M-Pesa Fraud Detection System A real-time transaction fraud detection and prevention system built for the Kenyan mobile money ecosystem. The system intercepts M-Pesa transactions before settlement and returns an `ALLOW`, `CHALLENGE`, or `BLOCK` decision within the latency window of a transaction initiation. --- ## Problem Statement M-Pesa processes **37.15 billion transactions annually**, with a total value of **KSh 38.29 trillion**. Conservative estimates place annual fraud losses at **KSh 2.3 billion (~$17.6M USD)** (approximately KSh 6.3 million stolen every single day). Common attack vectors include SIM swaps, social engineering, fraudulent merchant transactions, number masking, and fake balance SMS traps. --- ## Solution Rather than logging fraud after the fact, this system sits **between transaction initiation and transaction completion**, scoring each transaction in real time and returning one of three decisions: | Decision | Condition | |---|---| | `ALLOW` | Low fraud probability: transaction proceeds normally | | `CHALLENGE` | Elevated risk: OTP or user verification triggered | | `BLOCK` | High fraud probability or deterministic fraud signal: transaction halted before settlement | --- ## Project Structure ```text Mpesa-Fraud-Detection-System/ ├── Data/ │ ├── mpesa_synthetic.csv: Raw dataset (120K synthetic M-Pesa transactions) │ ├── Feature_engineered.csv: Engineered dataset │ ├── training.csv: Training split (109,915 rows) │ └── evaluation.csv: Unseen evaluation set (10,000 rows) ├── inference/ │ ├── models/ │ │ ├── best_model.pkl: Trained XGBoost model (GridSearchCV tuned) │ │ └── encoder.pkl: Fitted ColumnTransformer encoder │ ├── utils/ │ │ ├── feature_engineering.py: Derives drain_rate, account_emptied, cyclic encoding │ │ └── preprocessing.py: Drops columns, maps device_type, applies encoder │ ├── main.py: FastAPI application │ ├── requirements.txt: Production dependencies │ ├── .env: Local environment v …

Visit

github.com

Languages

Lusengo

Similar

lloydeila/mpesa-fraud-detection-systemgiciriri/mpesa-fraud-detectionWElvis87/MPESA-Fraud-DetectionCarolinenkatha/mpesa-fraud-detectionBrian-Mbuya/mpesa-fraud-detectionBrian-10-star/mpesa-fraud-detection

lloydeila/mpesa-fraud-detection-system

Mpesa mobile application built using MIT App Inventor # Mpesa Fraud Detection System ## 🔍 Overview

giciriri/mpesa-fraud-detection

# FraudGuard — AI-Powered M-Pesa Fraud Detection System > A real-time intelligent fraud detection p

WElvis87/MPESA-Fraud-Detection

# 🛡️ M-PESA Fraud Detection System ## 🎯 Problem Definition: M-PESA is the primary digital payment

Carolinenkatha/mpesa-fraud-detection

A machine learning project that detects fraudulent mobile money transactions using Random Forest. #

Brian-Mbuya/mpesa-fraud-detection

Unsupervised fraud and anomaly detection on mobile money transactions (M-Pesa style) using Isolation

Brian-10-star/mpesa-fraud-detection

# M-Pesa Fraud Detection ML Platform ## Project Highlights - Built an end-to-end M-Pesa fr