How sairamchamakuri/razorpay-buildathon works
PayAssure AI is a merchant POS system for assessing whether a failed payment caused by a temporary bank outage can be deferred. The main workflow runs from checkout and risk assessment through merchant PIN/QR approval, a timed deferred-payment lifecycle, and settlement by bank recovery, UTR, or cash; reminders, analytics, and model metrics support that flow. The sampled code confirms key API, model, and UI connections. Some endpoint and service details are documented or indexed but unsampled, so uncertain links are omitted.
Main entry points: api.ts HTTP API client · App.tsx Application shell · deferred.py Deferred payment operations · payments.py Payment intake
Components 21
POS experience
- Application shell
frontend/src/App.tsx - Merchant POS
frontend/src/components/MerchantPOS.tsx - Customer mobile
frontend/src/components/CustomerMobile.tsx - Merchant dashboard
frontend/src/components/MerchantDashboard.tsx - Demo controls
frontend/src/components/DemoToolbar.tsx - Model metrics view
frontend/src/components/ModelMetricsModal.tsx - HTTP API client
frontend/src/services/api.ts
Payment API
- Payment intake
backend/app/api/payments.py - Deferred payment operations
backend/app/api/deferred.py - Merchant analytics
backend/app/api/merchant.py - Demo operations
backend/app/api/demo.py - Customer risk endpoint
backend/app/api/risk.py - FastAPI application
backend/app/main.py
Risk assessment
- Risk policy and scoring
backend/app/services/risk_engine.py - Customer features
ml/features.py
Deferred lifecycle and state
- Database session
backend/app/database.py - Payment entities
backend/app/models/entities.py - Settlement methods
backend/app/services/settlement_service.py - Reminder notifications
backend/app/services/notification_service.py - Audit log
backend/app/services/audit_service.py
Other components
- Merchant or customer
Connections 31
- Merchant or customer → Application shell: uses
README.md - Application shell → Merchant POS: renders
frontend/src/App.tsx - Application shell → Customer mobile: renders
frontend/src/App.tsx - Application shell → Merchant dashboard: renders
frontend/src/App.tsx - Application shell → Demo controls: renders
frontend/src/App.tsx - Application shell → Model metrics view: renders
frontend/src/App.tsx - Application shell → HTTP API client: calls
frontend/src/App.tsx - Merchant POS → HTTP API client: calls
frontend/src/components/MerchantPOS.tsx - Customer mobile → HTTP API client: calls
frontend/src/components/CustomerMobile.tsx - Merchant dashboard → HTTP API client: calls
frontend/src/components/MerchantDashboard.tsx - HTTP API client → Payment intake: requests
README.md - HTTP API client → Deferred payment operations: requests
README.md - HTTP API client → Merchant analytics: requests
README.md - HTTP API client → Demo operations: requests
README.md - HTTP API client → Customer risk endpoint: requests
README.md - Payment intake → Risk policy and scoring: evaluates risk
backend/app/api/payments.py - Risk policy and scoring → Customer features: extracts features
backend/app/services/risk_engine.py - Payment intake → Database session: reads and writes
backend/app/api/payments.py - Payment intake → Payment entities: creates records
backend/app/api/payments.py - Payment intake → Audit log: records events
backend/app/api/payments.py - Deferred payment operations → Database session: reads and writes
backend/app/api/deferred.py - Deferred payment operations → Payment entities: updates lifecycle
backend/app/api/deferred.py - Deferred payment operations → Settlement methods: processes settlement
backend/app/api/deferred.py - Deferred payment operations → Reminder notifications: dispatches reminders
backend/app/api/deferred.py - Deferred payment operations → Audit log: records events
backend/app/api/deferred.py - FastAPI application → Payment intake: registers router
backend/app/main.py - FastAPI application → Deferred payment operations: registers router
backend/app/main.py - FastAPI application → Merchant analytics: registers router
backend/app/main.py - FastAPI application → Demo operations: registers router
backend/app/main.py - FastAPI application → Customer risk endpoint: registers router
backend/app/main.py - Model metrics view → HTTP API client: loads metrics