A secure, feature-rich UPI payment application built with React Native (Expo) and Node.js backend. Supports QR code scanning, instant payments, transaction history, and industry-standard security practices.
- π± QR Code Scanner: Scan UPI QR codes with camera
- πΈ Instant Payments: Send money via UPI with PIN/biometric authentication
- π Transaction History: View all past transactions with status
- π Secure Authentication: UPI PIN entry with biometric fallback
- π° Balance Display: Real-time account balance
- π¨ Modern UI: Clean, intuitive interface with smooth animations
- π Haptic Feedback: Tactile responses for key actions
- π AES-256 encryption for sensitive data
- π Secure storage using Expo SecureStore
- ποΈ Biometric authentication (Face ID/Touch ID)
- β Transaction checksum verification
- π‘οΈ Input validation and sanitization
- Node.js 18+ and npm
- Expo CLI:
npm install -g expo-cli - iOS Simulator (Mac) or Android Emulator
- Backend server (Node.js/Express)
- Install dependencies:
npm install- Start the development server:
npm start- Run on device/simulator:
# iOS
npm run ios
# Android
npm run android
# Web (for testing only)
npm run web- Navigate to backend directory:
cd backend- Install dependencies:
npm install- Configure environment:
cp .env.example .env
# Edit .env with your API keys- Start server:
npm startThe backend will run on http://localhost:3000
This app supports multiple payment gateways. Choose one:
- Sign up at Razorpay
- Get API keys from dashboard
- Add to
backend/.env:
RAZORPAY_KEY_ID=your_key_id
RAZORPAY_KEY_SECRET=your_secret- Register as merchant at PhonePe Business
- Get merchant credentials
- Add to
backend/.env:
PHONEPE_MERCHANT_ID=your_merchant_id
PHONEPE_SALT_KEY=your_salt_key-
Install PostgreSQL
-
Create database:
CREATE DATABASE finwise;- Run migrations:
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name VARCHAR(255) NOT NULL,
vpa VARCHAR(255) UNIQUE NOT NULL,
mobile_number VARCHAR(15) UNIQUE NOT NULL,
balance DECIMAL(10, 2) DEFAULT 0.00,
upi_pin_hash VARCHAR(255),
created_at TIMESTAMP DEFAULT NOW()
);
CREATE TABLE transactions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES users(id),
transaction_id VARCHAR(255) UNIQUE NOT NULL,
amount DECIMAL(10, 2) NOT NULL,
receiver_vpa VARCHAR(255) NOT NULL,
receiver_name VARCHAR(255),
transaction_note TEXT,
status VARCHAR(50) DEFAULT 'pending',
transaction_ref VARCHAR(255),
payment_method VARCHAR(50) DEFAULT 'UPI',
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX idx_user_transactions ON transactions(user_id, created_at DESC);
CREATE INDEX idx_transaction_id ON transactions(transaction_id);finwise-app/
βββ app/ # App screens (Expo Router)
β βββ (tabs)/ # Tab navigation
β β βββ index.tsx # Home dashboard
β β βββ explore.tsx # Transaction history
β βββ scan-pay.tsx # QR scanner screen
β βββ payment-confirm.tsx # Payment confirmation
β βββ payment-processing.tsx # Payment processing
β βββ transactions.tsx # Full transaction list
βββ components/ # Reusable components
β βββ payment/ # Payment-specific components
β β βββ QRScanner.tsx # QR code scanner
β β βββ PINInput.tsx # UPI PIN input
β βββ ui/ # UI components
βββ context/ # React Context
β βββ PaymentContext.tsx # Payment state management
βββ services/ # API services
β βββ api.ts # Backend API integration
βββ utils/ # Utility functions
β βββ security.ts # Security utilities
βββ types/ # TypeScript types
β βββ upi.ts # UPI-related types
βββ backend/ # Node.js backend
βββ server.js # Express server
βββ package.json # Backend dependencies
- Never store UPI PINs in plain text - Always hash using bcrypt or similar
- Use HTTPS for all API communications in production
- Implement rate limiting to prevent brute force attacks
- Validate all inputs on both client and server side
- Use environment variables for sensitive configuration
- Enable 2FA for production deployments
- Regular security audits and dependency updates
- Log monitoring for suspicious activities
- Install EAS CLI:
npm install -g eas-cli- Configure EAS:
eas build:configure- Build for iOS:
eas build --platform ios- Build for Android:
eas build --platform androidRecommended platforms:
- AWS EC2/ECS - Scalable, production-ready
- Heroku - Quick deployment, easy scaling
- DigitalOcean App Platform - Simple, affordable
- Google Cloud Run - Serverless, auto-scaling
Initiate a new UPI payment
{
"amount": 100.00,
"receiverVPA": "user@bank",
"receiverName": "John Doe",
"note": "Payment for dinner",
"transactionId": "TXN123456",
"checksum": "abc123..."
}Verify payment status
Get transaction history
Validate UPI VPA
- Valid:
demo@finwise,test@paytm,merchant@phonepe - Invalid:
invalid@xyz
Generate test UPI QR codes:
upi://pay?pa=demo@finwise&pn=Demo%20Merchant&am=100.00&cu=INR&tn=Test%20Payment
MIT License - See LICENSE file for details
Contributions welcome! Please read CONTRIBUTING.md first.
For issues and questions:
- GitHub Issues: Create an issue
- Email: support@finwise.com
- RBI guidelines
- NPCI certification requirements
- PCI DSS standards
- Data privacy laws (DPDP Act, GDPR)