Skip to content
Himanshu1137Public

About

RecoverAI is an AI-powered failed payment recovery platform that uses ML and Gemini AI to prioritize recoverable transactions and recommend recovery actions. Built with React, FastAPI, and PostgreSQL, it also tracks recovery performance and recovered revenue.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

🤖 RecoverAI – Intelligent Revenue Recovery Agent

AI-Powered Payment Recovery & Transaction Intelligence Platform

Recover failed payments, analyze transaction data, prioritize recovery cases, and assist recovery teams with intelligent insights.


Live Demo GitHub Repository


📸 Dashboard Preview

RecoverAI Dashboard

RecoverAI provides a centralized dashboard for monitoring transactions, analyzing payment failures, managing recovery priorities, and interacting with the AI Recovery Agent.


🚀 Live Demo

Open RecoverAI Demo

Live Application: https://recover-ai-orcin-two.vercel.app/


📌 Overview

RecoverAI is an intelligent revenue recovery platform designed to help businesses identify failed payments, analyze transaction and customer information, prioritize recovery cases, and support recovery teams with AI-assisted insights.

The platform combines:

  • ⚛️ React frontend
  • ⚡ FastAPI backend
  • 🐍 Python
  • 🤖 Machine Learning
  • 🗄️ PostgreSQL
  • 📊 Transaction analytics
  • 📁 CSV data processing
  • 🤖 AI-assisted recovery workflow

The goal is simple:

Turn failed payment data into actionable recovery opportunities.


✨ Key Features

📊 Intelligent Dashboard

A centralized dashboard to monitor payment recovery operations.

It provides visibility into:

  • Total transactions
  • Failed payments
  • Transaction amounts
  • Recovery priorities
  • Customer information
  • Payment analytics

💳 Transaction Management

RecoverAI allows users to view detailed transaction information.

Transaction Details

  • Transaction ID
  • Customer ID
  • Customer Name
  • Amount
  • Payment Method
  • Failure Reason
  • Attempt Number
  • Previous Success Rate
  • Customer Transaction Count
  • Customer Lifetime Value
  • Recovery Priority

🎯 Priority Recovery Queue

Transactions can be organized according to their recovery priority.

Priority Description
🔴 High Requires immediate recovery attention
🟡 Medium Requires follow-up
🟢 Low Lower-priority recovery case

This helps recovery teams focus their efforts on the most important transactions.


🤖 AI Recovery Agent

The AI Recovery Agent provides an intelligent interface for analyzing failed payment situations and supporting recovery decisions.

It can help users understand:

  • Why a payment failed
  • Customer transaction context
  • Recovery priority
  • Potential recovery actions
  • Important transaction information

📁 CSV Transaction Import

Users can upload transaction data through CSV files.

RecoverAI processes the uploaded data and displays the transactions inside the dashboard.

Required CSV Columns

transaction_id
customer_id
customer_name
amount
payment_method
failure_reason
attempt_number
previous_success_rate
customer_transaction_count
customer_lifetime_value
priority

Sample CSV

transaction_id,customer_id,customer_name,amount,payment_method,failure_reason,attempt_number,previous_success_rate,customer_transaction_count,customer_lifetime_value,priority
TXN001,CUST001,Rahul Sharma,12500,UPI,Insufficient Balance,2,0.82,18,95000,High
TXN002,CUST002,Ananya Singh,4500,Credit Card,Card Declined,1,0.91,12,62000,Medium
TXN003,CUST003,Aman Verma,1800,Net Banking,Timeout,3,0.65,7,28000,Low

🧠 Machine Learning

RecoverAI contains a dedicated Machine Learning module under the ml/ directory.

The ML pipeline is responsible for training models and generating predictions from transaction data.

ML Structure

ml/
│
├── __init__.py
├── train.py
├── predict.py
└── models/

ML Components

File / Folder Purpose
train.py Machine Learning model training
predict.py Loading the trained model and generating predictions
models/ Stores trained model files
__init__.py Initializes the ML package

ML Technologies

  • 🐍 Python
  • 🤖 Scikit-learn
  • 🐼 Pandas
  • 🔢 NumPy
  • 📊 Feature Processing
  • 🎯 Predictive Analysis

ML Workflow

Transaction Data
       ↓
Data Processing
       ↓
Feature Preparation
       ↓
Model Training
       ↓
Trained Model
       ↓
Prediction
       ↓
Recovery Analysis

📈 Analytics

RecoverAI provides analytics to help understand payment and transaction patterns.

Analytics can be used to monitor:

  • Payment failures
  • Transaction amounts
  • Recovery priorities
  • Customer activity
  • High-value transactions
  • Recovery opportunities

🌙 Dark & Light Mode

RecoverAI provides a modern responsive interface with:

  • 🌙 Dark Mode
  • ☀️ Light Mode
  • 💻 Desktop support
  • 📱 Responsive layout

🛠️ Tech Stack

Backend

  • 🐍 Python
  • ⚡ FastAPI
  • 🔗 REST APIs
  • 🗄️ PostgreSQL

Frontend

  • ⚛️ React
  • JavaScript
  • HTML
  • CSS

Machine Learning

  • 🤖 Scikit-learn
  • 🐼 Pandas
  • 🔢 NumPy
  • 📊 Feature Processing
  • 🎯 Predictive Analysis

Data & AI

  • CSV Data Processing
  • Transaction Analysis
  • Customer Data Analysis
  • Payment Failure Analysis
  • Recovery Priority Analysis
  • AI-assisted Recovery Workflow

Development Tools

  • Git
  • GitHub
  • VS Code
  • Postman

🏗️ System Architecture

                         ┌──────────────────────┐
                         │        USER          │
                         └──────────┬───────────┘
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │   React Dashboard    │
                         │      Frontend        │
                         └──────────┬───────────┘
                                    │
                               REST API
                                    │
                                    ▼
                         ┌──────────────────────┐
                         │      FastAPI         │
                         │       Backend        │
                         └──────────┬───────────┘
                                    │
              ┌─────────────────────┼─────────────────────┐
              │                     │                     │
              ▼                     ▼                     ▼
       ┌──────────────┐      ┌──────────────┐      ┌──────────────┐
       │ Transaction  │      │ Machine      │      │ AI Recovery  │
       │ Processing   │      │ Learning     │      │ Agent        │
       └──────┬───────┘      └──────┬───────┘      └──────┬───────┘
              │                     │                     │
              └─────────────────────┼─────────────────────┘
                                    ▼
                         ┌──────────────────────┐
                         │     PostgreSQL       │
                         │       Database       │
                         └──────────────────────┘

🔄 How RecoverAI Works

                    CSV / Transaction Data
                             │
                             ▼
                    Transaction Validation
                             │
                             ▼
                       Data Processing
                             │
                             ▼
                  Customer & Payment Analysis
                             │
                             ▼
                    ML Model / Prediction
                             │
                             ▼
                   Recovery Prioritization
                             │
                  ┌──────────┴──────────┐
                  ▼                     ▼
          Priority Queue         AI Recovery Agent
                  │                     │
                  └──────────┬──────────┘
                             ▼
                      Recovery Action
                             │
                             ▼
                         Analytics

📂 Project Structure

RecoverAI/
│
├── backend/
│   ├── main.py
│   ├── routes/
│   ├── services/
│   ├── models/
│   └── requirements.txt
│
├── frontend/
│   ├── src/
│   ├── public/
│   └── package.json
│
├── ml/
│   ├── __init__.py
│   ├── train.py
│   ├── predict.py
│   └── models/
│
├── data/
│   └── sample_transactions.csv
│
├── assets/
│   ├── recoverai-dashboard.png
│   ├── transactions.png
│   ├── ai-recovery-agent.png
│   └── analytics.png
│
├── .gitignore
├── README.md
└── requirements.txt

⚙️ Installation & Setup

1. Clone the Repository

git clone https://github.com/Himanshu1137/RecoverAI.git
cd RecoverAI

2. Create Python Virtual Environment

python -m venv venv

Windows

.\venv\Scripts\Activate.ps1

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

Create a .env file in the project root:

DATABASE_URL=your_postgresql_connection_string

Add any other required API keys or configuration values used by your application.

⚠️ Never commit .env, API keys, passwords, or database credentials to GitHub.


▶️ Run Backend

Start the FastAPI server:

uvicorn main:app --reload

Backend:

http://127.0.0.1:8000

FastAPI Documentation

http://127.0.0.1:8000/docs

▶️ Run Frontend

Open another terminal:

cd frontend
npm install
npm run dev

Open the local URL displayed by Vite.


🧠 Run ML Model

From the project root:

python ml/train.py

After training, the generated model can be used for prediction through:

python ml/predict.py

Adjust the commands if your train.py or predict.py expects specific arguments or input files.


🧪 Testing

Run backend tests:

pytest

API testing can be performed using:

  • Postman
  • FastAPI Swagger UI

🎯 Use Cases

RecoverAI can help businesses dealing with:

  • Failed online payments
  • Subscription payment failures
  • Recurring payment failures
  • Payment retry management
  • Customer payment follow-ups
  • Revenue leakage
  • Transaction prioritization
  • Payment recovery operations

💡 Problem Statement

Failed payments can result in revenue loss when businesses cannot quickly identify which transactions deserve recovery attention.

Traditional dashboards often answer:

Which payments failed?

RecoverAI aims to answer:

Which failed payment should we recover first, and why?

The platform combines transaction data, customer context, Machine Learning, analytics, and AI-assisted recovery workflows to turn payment failures into actionable recovery opportunities.


🌟 Project Highlights

Area Implementation
Frontend React
Backend FastAPI
Programming Python
Database PostgreSQL
API REST API
Machine Learning Scikit-learn
Data Processing Pandas, NumPy
Input CSV
AI AI-assisted Recovery
UI Responsive Dashboard
Theme Dark / Light Mode

📸 Screenshots

Dashboard

RecoverAI Dashboard

Transactions

RecoverAI Transactions

AI Recovery Agent

RecoverAI AI Recovery Agent

Analytics

RecoverAI Analytics


🔮 Future Improvements

  • Advanced recovery-probability model
  • Automated payment retry recommendations
  • Email/SMS recovery integration
  • Customer segmentation
  • Recovery success prediction
  • Real-time payment monitoring
  • Advanced AI recovery strategies
  • User authentication
  • Role-based access control
  • Cloud deployment
  • Automated recovery reports

🔐 Security

For production deployment:

  • Keep secrets in environment variables
  • Never commit .env
  • Validate uploaded CSV files
  • Secure database credentials
  • Implement authentication and authorization
  • Follow API security best practices

👨‍💻 Developer

Himanshu Pal

B.Tech Computer Science & Engineering (Artificial Intelligence)

Interests

  • Artificial Intelligence
  • Machine Learning
  • Software Engineering
  • Backend Development
  • Full-Stack Development
  • AI-powered Applications

🚀 Live Demo

RecoverAI Live Demo


⭐ Support

If you find RecoverAI useful or interesting, consider giving the repository a ⭐ on GitHub.


📄 License

This project is developed for educational, portfolio, and demonstration purposes.

About

RecoverAI is an AI-powered failed payment recovery platform that uses ML and Gemini AI to prioritize recoverable transactions and recommend recovery actions. Built with React, FastAPI, and PostgreSQL, it also tracks recovery performance and recovered revenue.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages