Skip to content

momattar/transactionsMLapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔄 Transactions Fraud Detection API

A Flask-based API that predicts fraudulent online payment transactions using a machine learning model trained on real transaction data.


🌐 Hosted API


📌 Overview

This API accepts JSON-formatted transaction details and returns a fraud prediction based on a trained ML model.
It is intended to be used by external applications (e.g., an ASP.NET MVC).


🧠 Machine Learning Model

  • Algorithm: (e.g., Random Forest / XGBoost)
  • Training Notebook: Online-Payment-Fraud-Detection.ipynb
  • Model Input: Cleaned and one-hot encoded transaction data
  • Output:
    • 0 → Legitimate transaction
    • 1 → Fraudulent transaction

🔧 API Usage

POST /predict

URL:
https://transactionsmlapi-production.up.railway.app/predict

Request Headers:

Content-Type: application/json

📥 Request Format

Send a JSON object with the following structure (sample):

{
  "type": "CASH_OUT",
  "amount": 9800,
  "oldbalanceOrg": 9800,
  "newbalanceOrig": 0,
  "oldbalanceDest": 0,
  "newbalanceDest": 0
}

📥 Response Format

{
  "prediction": "Fraud"  // or "Not Fraud"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors