Overview
This guide walks you through building a complete wallet integration using the FLEX SSO API. You’ll learn how to handle authentication, display balances, process transactions, and manage payment requests.Estimated Time: 2-3 hours for complete integrationPrerequisites:
- Partner API credentials
- Development environment set up
- Understanding of OAuth 2.0 flow
Integration Roadmap
1
Environment Setup
Configure credentials and create API client
2
Implement Auth Flow
Add customer login and token management
3
Display Wallet Balance
Show customer wallet information
4
Build Transaction Features
Enable P2P transfers, withdrawals, and payments
5
Add Payment Requests
Create and manage payment requests
6
Test & Deploy
Verify integration and go live
Step 1: Environment Setup
Configure Environment Variables
.env
Create API Client
Step 2: Implement Authentication
Login Flow
Step 3: Display Wallet Balance
Wallet Dashboard
Step 4: Build Transaction Features
P2P Transfer
Withdrawal to Bank
Step 5: Payment Requests
Create Payment Request
Step 6: Test & Deploy
Testing Checklist
✅ Authentication Flow
✅ Authentication Flow
- Login with existing customer works
- PayTag creation flow completes successfully
- Token is stored and persists across requests
- Logout clears session properly
- 401 errors trigger re-authentication
✅ Wallet Operations
✅ Wallet Operations
- Balance displays correctly
- Transaction history loads with pagination
- Wallet limits are enforced
- Virtual accounts display correctly
✅ Transactions
✅ Transactions
- P2P transfers complete successfully
- Withdrawals process correctly
- Transaction status updates properly
- Error messages are user-friendly
✅ Payment Requests
✅ Payment Requests
- Creating payment requests works
- Accepting payment requests completes transfer
- Declining/canceling updates status
- Expired requests are handled
Go Live Checklist
1
Complete Staging Tests
Verify all features work in staging environment
2
Update Environment
Switch to production URLs and credentials
3
Enable HTTPS
Ensure all requests use HTTPS in production
4
Set Up Monitoring
Implement logging and error tracking
5
Deploy & Monitor
Deploy to production and monitor closely
Best Practices
Token Management
Store tokens server-side only, never in localStorage
Error Handling
Provide clear error messages to users
Loading States
Show loading indicators during API calls
Transaction Receipts
Display confirmation for all transactions
Common Pitfalls
Next Steps
API Reference
Explore all available endpoints
Support
Questions? Contact us:- Email: developers@yourflexpay.com