> ## Documentation Index
> Fetch the complete documentation index at: https://docs.handle.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Remita Treasury & 30m Tier Verification

> Automated Remita float management and 30-meter live GPS + Street View address verification.

## 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:

1. **Live Balance Check:** Calls `GET /vending/transactions/wallet-balance?accountNumber=8000009102&bankCode=090360` via the whitelisted egress proxy (`34.26.1.81`).
2. **Sufficient Balance:** If `availableBalance >= billAmount`, the bill vends on Remita immediately.
3. **Insufficient Balance & ₦12.90 Fee Guard:**
   * Computes item commission (`faceValue - primaryCostPrice`).
   * If `commission <= ₦12.90` and `kuda` is available in `fallbackRoutes`, Handle **routes the payout through Kuda directly**, logs `REMITA_WALLET_LOW`, and sends an admin email alert.
   * Otherwise, Handle transfers `Math.ceil(billAmount - balance + 12.90)` from **Kuda → Remita**, polls `wallet-balance` every **30 seconds** (up to 10 attempts), and vends on Remita as soon as the funds arrive.
4. **Admin Endpoint:** `GET /admin/vas/remita-balance` returns the live Remita wallet balance.

***

## Tier Upgrade & 30-Meter Entrance Verification

1. **Address Autocomplete:** `GET /api/v1/users/tier-upgrade/autocomplete` queries Apple Maps Server API → Google Places → OpenStreetMap Nominatim.
2. **360° Street View Gate Pinning:** Users center their gate in the `StreetViewPanoramaCanvas` reticle, capturing `(entranceLatitude, entranceLongitude, entranceHeading, entrancePitch)`.
3. **30-Meter Precise GPS Enforcement:** Mobile (`LocationHelper`) enforces Precise Location (`LocationAccuracy.best`, rejecting approximate/reduced accuracy), and `POST /api/v1/users/tier-upgrade` rejects pins farther than **30 meters** from the user's live GPS coordinates.
4. **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.IO `user_notification`** alerts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.