Turn failed payments into recovered revenue.
RecoverAI is an AI-powered payment recovery platform designed to help small businesses understand failed payments, identify recovery opportunities, and take informed action to recover lost revenue.
Built for the PayPal AI Hackathon, RecoverAI combines PayPal Sandbox integration, payment analytics, and an AI-powered recovery copilot to make payment recovery smarter, safer, and more efficient.
- Frontend: https://recoverai-frontend-lg06.onrender.com
- Backend API: https://recoverai-backend-2f41.onrender.com
Failed, pending, and abandoned payments create revenue losses for small businesses.
Merchants often struggle to understand why payments fail, which customers need attention first, and what action they should take next.
Manual payment tracking and follow-ups consume time, while a lack of actionable insights can lead to missed recovery opportunities.
RecoverAI provides a centralized platform that helps merchants monitor payment activity, understand payment failures, and manage recovery workflows.
Instead of simply displaying failed transactions, RecoverAI helps merchants understand what happened and what they can do next.
- Monitor completed, failed, and pending payments.
- View payment performance and revenue metrics.
- Track payment success rates.
- Identify payments that need attention.
- View payment transactions and their statuses.
- Search and monitor payment records.
- Examine recorded payment failure information.
- Review payment attempts and transaction details.
- Analyze recorded payment failure information.
- Explain possible reasons behind payment failures.
- Recommend relevant recovery actions.
- Generate personalized payment recovery message drafts.
- Provide rule-based fallback responses when AI service availability is limited.
- Create PayPal Sandbox checkout orders.
- Verify payment status through the backend.
- Capture payments after customer approval.
- Store verified payment information.
- Support PayPal webhook event processing.
- Generate recovery recommendations.
- Create and track recovery actions.
- Generate recovery checkout links.
- Verify and capture approved recovery payments.
- Update payment and recovery statuses consistently.
- Monitor: The merchant views payment activity in the dashboard.
- Identify: The system identifies payments that require attention.
- Analyze: The AI Recovery Copilot analyzes recorded payment and failure information.
- Recommend: RecoverAI suggests an appropriate recovery action.
- Recover: The merchant initiates a recovery checkout workflow.
- Verify: The backend verifies the PayPal transaction before updating payment records.
Important: AI-generated explanations and recommendations do not determine payment status. Payment outcomes are verified using PayPal data on the backend. Recovery captures require customer approval and an explicit capture action.
| Category | Technologies |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | Node.js, Express.js |
| Database | PostgreSQL |
| Payment Integration | PayPal REST API, PayPal Sandbox |
| AI Integration | Google Gemini API |
| Authentication | JSON Web Tokens (JWT) |
| API Architecture | REST API |
| Deployment | Render |
MERCHANT
|
v
FRONTEND APPLICATION
HTML / CSS / JS
|
v
EXPRESS REST API
|
+---------+----------+
| | |
v v v
PostgreSQL PayPal AI Service
Database API Gemini API
| | |
+---------+----------+
|
v
PAYMENT RECOVERY
ENGINE
|
v
VERIFIED PAYMENT STATUS
- JWT-based authentication.
- Merchant-scoped access to payment and recovery data.
- Sensitive API credentials stored in environment variables.
- Payment status verified through PayPal's backend API.
- No storage of customer card details.
- Customer approval required before recovery payment capture.
- Duplicate recovery actions are guarded against.
- Database transactions and locking help maintain payment and recovery consistency.
RecoverAI uses PostgreSQL to manage merchant accounts, customer information, payment records, recovery recommendations, and transaction history.
Core database tables include:
userscustomerspaymentspayment_attemptsfailure_analysisrecovery_recommendationsrecovery_actionsnotificationswebhook_events
RecoverAI/
โ
โโโ backend/
โ โโโ database/
โ โ โโโ schema.sql
โ โ
โ โโโ src/
โ โ โโโ config/
โ โ โโโ controllers/
โ โ โโโ middleware/
โ โ โโโ routes/
โ โ โโโ services/
โ โ โโโ server.js
โ โ
โ โโโ .env.example
โ โโโ .gitignore
โ โโโ package.json
โ โโโ package-lock.json
โ
โโโ frontend/
โ โโโ index.html
โ โโโ script.js
โ โโโ styles.css
โ
โโโ .gitignore
โโโ README.md
- Node.js and npm
- PostgreSQL
- Git
- A PayPal Developer Sandbox account
git clone YOUR_GITHUB_REPOSITORY_URL
cd RecoverAIcd backend
npm installCreate a .env file inside the backend directory using .env.example as a reference.
Configure the following variables:
PORT=5000
DATABASE_URL=your_postgresql_connection_string
JWT_SECRET=your_jwt_secret
PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_CLIENT_SECRET=your_paypal_client_secret
PAYPAL_WEBHOOK_ID=your_paypal_webhook_id
GEMINI_API_KEY=your_gemini_api_key
For security purpose the id and other keys are not revealed publicly.Use your own credentials. Never commit .env or expose API secrets publicly.
Create a PostgreSQL database and execute the SQL schema from:
backend/database/schema.sql
npm run devThe backend runs locally at:
http://localhost:5000
Open frontend/index.html using VS Code Live Server.
The frontend communicates with the backend REST API.
RecoverAI uses PayPal Sandbox for payment testing.
The project supports testing of:
- Merchant authentication.
- Payment monitoring.
- Payment analysis.
- Recovery recommendation generation.
- Recovery action creation.
- PayPal checkout creation.
- Customer-approved payment capture.
- Payment and recovery status consistency.
Use Sandbox accounts and test transactions rather than real customer payments.
- Addresses a practical financial problem affecting small businesses.
- Combines AI assistance with verified payment information.
- Integrates PayPal Sandbox payment workflows.
- Converts payment failure information into actionable recovery recommendations.
- Provides a complete recovery workflow from analysis to verified capture.
- Includes fallback analysis and message generation when the AI provider is unavailable.
- Production-ready email and notification integrations.
- More advanced payment failure prediction.
- Improved recovery prioritization.
- Additional payment provider integrations.
- Expanded merchant analytics.
- Production-grade monitoring and observability.
PayPal AI Hackathon
Developed as a solo project.
We believe a failed payment should not automatically mean lost revenue.
RecoverAI aims to make every payment recovery opportunity smarter, simpler, and more actionable.
RecoverAI โ Recover revenue. Restore opportunities.