PRODUCT REQUIREMENTS DOCUMENT (PRD)
Product: EastPay v2 - AI-Driven Currency Exchange
Version: 2.0
Last Updated: January 2026
1. Product Overview
1.1 Problem Statement
Currency exchange in Southeast Asia, UAE, and Russia is fragmented:
- Clients don't know where to find reliable exchange services
- Operators spend hours on repetitive questions
- Rates are inconsistent across channels
- No unified system for tracking deals
1.2 Solution
EastPay v2 provides a unified platform where:
- Clients interact via Telegram bot (24/7 availability)
- AI handles routine inquiries
- Operators focus on deal approval and exceptions
- Rates are calculated automatically with consistent margins
1.3 Target Users
| User Type | Description | Primary Goals |
|---|---|---|
| Client | Individual needing currency exchange | Fast, reliable exchange with clear rates |
| Operator | Staff processing deals | Efficiently approve/reject orders |
| City Manager | Regional supervisor | Manage local rates and cash flow |
| Admin | System administrator | Full control, analytics, user management |
2. User Roles & Permissions
2.1 Client (Telegram User)
Capabilities:
- Start exchange flow via bot
- View current rates for their city
- Submit exchange requests
- Upload KYC documents
- View order history
- Contact support
Restrictions:
- Cannot see internal rates (cost price)
- Cannot modify own orders after submission
2.2 Operator
Capabilities:
- View orders assigned to them
- Change order status (pending -> processing -> done)
- Add notes to orders
- View client KYC documents
- Mark orders as paid/completed
Restrictions:
- Cannot modify rates
- Cannot see other operators' orders (unless escalated)
- Cannot delete orders
2.3 City Manager
Capabilities:
- Everything Operator can do, plus:
- View all orders in their city
- Modify local rates (within limits)
- Reassign orders between operators
- View city-level analytics
Restrictions:
- Cannot modify rates for other cities
- Cannot access global settings
2.4 Admin
Capabilities:
- Full system access
- User management (create/edit/delete)
- Global rate management
- View all analytics
- System configuration
- Access audit logs
3. Order Lifecycle
3.1 Order Statuses
┌─────────┐ ┌────────────┐ ┌────────────┐ ┌──────────┐ ┌──────┐
│ NEW │───>│ CALCULATED │───>│ PROCESSING │───>│ PAYMENT │───>│ DONE │
└─────────┘ └────────────┘ └────────────┘ └──────────┘ └──────┘
│ │ │ │
│ │ │ │
▼ ▼ ▼ ▼
┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ EXPIRED │ │ REJECTED │ │ CANCELLED│ │ FAILED │
└─────────┘ └──────────┘ └──────────┘ └──────────┘
3.2 Status Definitions
| Status | Description | Triggered By | Next Actions |
|---|---|---|---|
new |
Order just created | Client submission | Calculate rate |
calculated |
Rate calculated, awaiting confirmation | System | Client confirms or expires |
processing |
Operator is handling | Client confirmation | Payment or cancellation |
payment |
Awaiting payment proof | Operator action | Client uploads receipt |
done |
Successfully completed | Operator confirmation | Archive |
expired |
No action within timeout | System (24h) | Auto-close |
rejected |
Failed KYC or limits | Operator/System | Notify client |
cancelled |
Client cancelled | Client action | Refund if applicable |
failed |
Technical/payment failure | System | Investigation |
3.3 Status Transitions Rules
| From | To | Allowed By | Conditions |
|---|---|---|---|
| new | calculated | System | Rate lookup successful |
| new | expired | System | 24h timeout |
| calculated | processing | Client | Clicks "Confirm" |
| calculated | expired | System | 1h timeout |
| processing | payment | Operator | Details sent to client |
| processing | cancelled | Client/Operator | Request cancellation |
| payment | done | Operator | Payment verified |
| payment | failed | Operator | Payment issue |
4. KYC Requirements
4.1 KYC Levels
| Level | Requirements | Daily Limit | Monthly Limit |
|---|---|---|---|
| Level 0 (Guest) | Phone number | $100 | $500 |
| Level 1 (Basic) | + Full name, Photo | $1,000 | $5,000 |
| Level 2 (Verified) | + ID document scan | $10,000 | $50,000 |
| Level 3 (Premium) | + Video verification | $50,000 | Unlimited |
4.2 Required Documents
Level 1:
- Full legal name
- Selfie photo
Level 2:
- Government-issued ID (passport/national ID)
- Proof of address (utility bill, bank statement)
Level 3:
- Video call verification
- Source of funds declaration
4.3 KYC Verification Flow
- Client initiates exchange
- System checks current KYC level
- If order amount > level limit:
- Prompt for additional documents
- Hold order until verified
- Operator/System verifies documents
- KYC level upgraded
- Order continues
5. Notification System
5.1 Client Notifications (via Telegram)
| Event | Message Type | Timing |
|---|---|---|
| Order created | Confirmation | Immediate |
| Rate calculated | Rate details | Immediate |
| Order approved | Payment instructions | Immediate |
| Payment received | Confirmation | Immediate |
| Order completed | Thank you + receipt | Immediate |
| Order expired | Reminder | At expiry |
| Promotion | Marketing | Scheduled |
5.2 Operator Notifications
| Event | Channel | Priority |
|---|---|---|
| New order | Admin Panel + Sound | High |
| High-value order | Admin Panel + Telegram | Critical |
| KYC pending | Admin Panel | Medium |
| Order stuck > 1h | Telegram alert | High |
6. Business Rules
6.1 Rate Calculation Rules
- Base rate comes from
market_ratestable (external feed) - Cost price = Base rate + partner commission (from
instruments) - Selling rate = Cost price + our margin (from
ratesmatrix) - Client sees only selling rate
- Profit = (Selling rate - Cost price) * amount
6.2 Order Amount Rules
- Minimum order: $50 equivalent
- Maximum order: Based on KYC level
- Large orders (>$10k): Require manual approval
- VIP clients: Custom limits
6.3 Operating Hours
- Bot: 24/7 (AI handles basic queries)
- Operators: 09:00 - 22:00 (local time per city)
- Outside hours: Orders queue for next day
7. Communication Scripts
7.1 Tone of Voice
- Professional but friendly
- Clear and concise
- No jargon
- Emoji usage: Minimal, appropriate (checkmarks, currency symbols)
7.2 Message Templates
Order Created:
Your exchange request has been received.
Amount: {give_amount} {give_currency}
You receive: {receive_amount} {receive_currency}
Rate: {rate}
An operator will contact you shortly.
Order ID: {order_id}
Rate Quote:
Current rate for {city}:
{give_currency} -> {receive_currency}
Rate: {rate}
Valid for: 15 minutes
Reply "CONFIRM" to proceed.
Order Completed:
Your exchange is complete!
Exchanged: {give_amount} {give_currency}
Received: {receive_amount} {receive_currency}
Thank you for using EastPay!
8. Analytics Requirements
8.1 Dashboards Needed
Admin Dashboard:
- Total orders (today/week/month)
- Revenue and profit
- Orders by status
- Orders by city
- Conversion funnel
City Manager Dashboard:
- City-specific metrics
- Operator performance
- Rate comparison
Operator Dashboard:
- My orders
- Pending actions
- Personal stats
9. Integration Points
| System | Direction | Data |
|---|---|---|
| Typebot | -> Supabase | New orders, client data |
| Supabase | -> Admin Panel | Orders, rates, users |
| n8n | <-> Supabase | Calculations, notifications |
| n8n | -> Telegram | Client notifications |
| External Rate API | -> Supabase | Market rates |
10. Non-Functional Requirements
10.1 Performance
- Page load: < 2 seconds
- Rate calculation: < 500ms
- Search results: < 1 second
10.2 Availability
- Uptime target: 99.5%
- Planned maintenance: Off-peak hours only
10.3 Security
- All data encrypted in transit (HTTPS)
- PII encrypted at rest
- RLS policies on all tables
- Audit logging for sensitive operations