Remita Wallet Auto-Funding (VasOrchestratorService & RemitaTreasuryService)
When a bill payment’s primaryProvider is remita (selected by lowest primaryCostPrice during catalog sync) and Kuda confirms collection settlement:
- Live Balance Check: Calls
GET /vending/transactions/wallet-balance?accountNumber=8000009102&bankCode=090360via the whitelisted egress proxy (34.26.1.81). - Sufficient Balance: If
availableBalance >= billAmount, the bill vends on Remita immediately. - Insufficient Balance & ₦12.90 Fee Guard:
- Computes item commission (
faceValue - primaryCostPrice). - If
commission <= ₦12.90andkudais available infallbackRoutes, Handle routes the payout through Kuda directly, logsREMITA_WALLET_LOW, and sends an admin email alert. - Otherwise, Handle transfers
Math.ceil(billAmount - balance + 12.90)from Kuda → Remita, pollswallet-balanceevery 30 seconds (up to 10 attempts), and vends on Remita as soon as the funds arrive.
- Computes item commission (
- Admin Endpoint:
GET /admin/vas/remita-balancereturns the live Remita wallet balance.
Tier Upgrade & 30-Meter Entrance Verification
- Address Autocomplete:
GET /api/v1/users/tier-upgrade/autocompletequeries Apple Maps Server API → Google Places → OpenStreetMap Nominatim. - 360° Street View Gate Pinning: Users center their gate in the
StreetViewPanoramaCanvasreticle, capturing(entranceLatitude, entranceLongitude, entranceHeading, entrancePitch). - 30-Meter Precise GPS Enforcement: Mobile (
LocationHelper) enforces Precise Location (LocationAccuracy.best, rejecting approximate/reduced accuracy), andPOST /api/v1/users/tier-upgraderejects pins farther than 30 meters from the user’s live GPS coordinates. - Admin Review & Notifications: Submissions email compliance and appear on the Admin User Profile (
UserTierUpgradeCard.tsx) with the gate snapshot, 360° Google Street View link, 30m badge, and document viewer. Approving or rejecting triggers Brevo email, FCM push, and Socket.IOuser_notificationalerts.