PayFlow AI is a robust peer-to-peer (P2P) payment prototype integrating artificial intelligence to handle transaction velocity checks, risk holding, and real-time fraud mitigation. This platform simulates sending and requesting money while strictly managing compliance and limits, offering users an ultra-fast, secure financial experience.
This prototype was developed to showcase an enterprise-grade understanding of FinTech application architecture. Many payment applications handle the "happy path" well but fail gracefully when exceptions arise. I built this to demonstrate state management across complex failure modes—such as insufficient funds, risk holds, and daily limit breaches—and to construct a comprehensive UX around dispute resolutions.
Traditional P2P payment applications lack transparency around risk-based transaction holds and are frequently inflexible when users encounter exceptions (e.g., limits reached or potential fraud). Users need a platform that not only moves money but intelligently communicates why a payment might be delayed or declined.
- Everyday Consumers: Splitting bills, paying rent, sending gifts.
- Freelancers/Gig Workers: Receiving small-to-medium payments with clear transaction statuses.
- Sarah (The Splitter): 24, college student, constantly splits meals and cab fares. Needs immediate feedback on transaction status.
- Mark (The Freelancer): 35, freelance graphic designer. Needs robust transaction history and dispute resolution if a client's payment fails.
- Provide a frictionless interface for sending and requesting money.
- Implement transparent, simulated AI-driven velocity and risk checks.
- Ensure comprehensive handling of edge cases and failure states.
If users are provided with real-time, transparent feedback regarding AI-driven security holds and limits, their trust in the platform will increase, reducing customer support tickets related to "stuck" payments.
- Send & Request Money: Select from contacts, input amounts, and add notes.
- Velocity Checks: Simulated AI tracking transaction volume and frequency.
- Risk Holds: Automatic flagging of high-value transactions.
- Real-Time Limits: Visual tracking of daily payment limits.
- Transaction History: Comprehensive ledger with search and filtering.
- Dispute Center: Dedicated UX for managing transaction conflicts.
- Dashboard: User views balance and daily limits.
- Initiate: User clicks "Send Money", selects recipient, and enters amount.
- Processing: The system evaluates funds and AI risk parameters.
- Outcome: Payment succeeds, fails (e.g., limit exceeded), or is placed on a security hold.
- Review: User tracks the payment in the Transaction History.
- State Machine: Idle -> Processing -> Success / Failed / Risk Hold.
- Validation: Amount > 0, Sufficient Funds, within Daily Limit.
- AI Intervention: Amounts over $1000 trigger simulated risk holds.
- Must support simulated send and request flows.
- Must display transaction history with dynamic status indicators.
- Must block transactions exceeding the daily limit ($2000) or balance.
- Must flag transactions >$1000 for review.
- As a user, I want to send money to a contact so I can split bills.
- As a user, I want to see my transaction history to track my spending.
- As a user, I want to know immediately if a transaction failed due to insufficient funds.
- As a user, I want to see how much of my daily limit I have used.
- Payment modal allows selecting recipient and entering amount.
- Balances update immediately upon successful send.
- Transactions >$1000 show as "Pending" with a "Risk hold" error state.
- Attempting to send more than available balance yields a specific error.
- Synthetic Data vs Backend: A fully functioning backend was omitted to focus purely on the frontend state architecture and UX.
- Simulated AI: Real AI models for risk analysis are highly complex; a deterministic threshold (>$1000) was used to simulate this behavior for the prototype.
- Velocity Checks: Monitored via the Daily Limit tracker.
- Risk Scoring: Simulated "low risk" metric on the dashboard.
- Fraud Prevention: Transactions exceeding predefined thresholds are temporarily held.
- Users start with a fixed simulated balance.
- Contact list is hardcoded.
- Risk models flag specific static parameters.
- Frontend: React + TypeScript + Vite.
- Styling: Tailwind CSS + Lucide Icons.
- Charts: Recharts for activity visualization.
- State: React
useStatemanaging complex transaction state machines.
- React 18
- TypeScript
- Vite
- Tailwind CSS
- Recharts
- Lucide React
- Modals for Actions: Keeps the user in the context of their dashboard.
- Color Coding: Green (Success), Yellow (Pending/Hold), Red (Failed) for immediate cognitive recognition.
- Progress Bars: Visual representation of daily limits to prevent unexpected declines.
- Task Success Rate: Percentage of successful simulated transactions.
- Error Recovery Rate: How often users correct a failed state (e.g., lowering the amount).
- Time on Task: Speed from clicking "Send" to seeing the confirmation.
The current iteration encompasses the MVP, handling core P2P features, edge cases, and a comprehensive dashboard.
- Q1: Implement actual backend and database integration (Node.js/PostgreSQL).
- Q2: Integrate Plaid for real bank funding sources.
- Q3: Deploy actual machine learning models for anomaly detection.
- Group payments/splitting.
- International remittances with FX rates.
- Crypto/stablecoin off-ramps.
(Screenshots will be added to the screenshots/ directory)
screenshots/dashboard.pngscreenshots/payment_modal.pngscreenshots/history.png
- Node.js (v18+)
- Clone the repository:
git clone https://github.com/adishuklaa/ai-p2p-payment-platform.git cd ai-p2p-payment-platform - Install dependencies:
npm install
- Run the development server:
npm run dev
(None required for the synthetic data prototype. For future backend integration, see .env.example)
ai-p2p-payment-platform/
├── src/
│ ├── App.tsx # Main Application and State Logic
│ ├── index.css # Tailwind Base
│ └── main.tsx # React Entry Point
├── screenshots/ # UI Previews
├── package.json
└── tailwind.config.js
- State resets upon page reload due to reliance on React component state (no local storage or DB implemented yet).
- Risk AI is simulated via threshold logic rather than actual model inference.
- Add persistent storage (Zustand + LocalStorage).
- Build dedicated components rather than a single
App.tsxmonolith for better maintainability.
