A Flask-based API that predicts fraudulent online payment transactions using a machine learning model trained on real transaction data.
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).
- 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 transaction1→ Fraudulent transaction
URL:
https://transactionsmlapi-production.up.railway.app/predict
Request Headers:
Content-Type: application/jsonSend a JSON object with the following structure (sample):
{
"type": "CASH_OUT",
"amount": 9800,
"oldbalanceOrg": 9800,
"newbalanceOrig": 0,
"oldbalanceDest": 0,
"newbalanceDest": 0
}{
"prediction": "Fraud" // or "Not Fraud"
}