This API provides fraud detection capabilities for financial transactions.
Health check endpoint that returns API status.
Predicts whether a transaction is fraudulent.
{
"transaction_id": "ANON_287602",
"transaction_date": "2024-12-13 11:17:53",
"transaction_amount": 199.0,
"transaction_channel": "mobile",
"transaction_payment_mode": 10,
"payment_gateway_bank": 0,
"payer_email": "example@email.com",
"payer_mobile": "XXXXX967.0",
"payer_browser": 517,
"payee_id": "ANON_119",
"payee_ip": "xxx.xxx.xxx.xxx"
}{
"transaction_id": "ANON_287602",
"is_fraud": true
}-
Install dependencies:
pip install -r requirements.txt
-
Run the server:
python app.py
- Push code to GitHub
- Create new Web Service on Render
- Connect to GitHub repository
- Use the following settings:
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app
- Build Command:
- model.pkl: Trained machine learning model
- scaler.pkl: Feature scaler
None required
Run the test script:
python test.py