How it works
The screen fetches the full merchant list fromGET /v2/merchant_list and uses your device’s GPS location to calculate the distance to each merchant. Results are sorted from nearest to furthest.
Location permission is required to see distance information and enable sorting by proximity. If permission is denied, a prompt appears with a link to open your device’s Settings.
Features
Search
Type in the search bar to filter merchants by business name. Filtering is case-insensitive.
Distance sorting
Merchants are automatically sorted by distance from your current GPS location, nearest first.
Google Maps directions
Tap any merchant card to open Google Maps with turn-by-turn directions from your location to the merchant.
Pull to refresh
Pull down on the list to refresh the merchant data.
Merchant card
Each merchant card in the list shows:| Field | Description |
|---|---|
| Logo | Merchant profile image |
| Business name | The merchant’s registered business name |
| Address | The merchant’s street address |
| Distance | Distance in kilometres from your current location (e.g., 0.45 km) |
Search
The search field filters the already-loaded merchant list locally — no additional API calls are made as you type.Type a merchant name
Start typing in the search bar at the top of the screen. The list updates instantly.
Location permission
On Android, the app requestsACCESS_FINE_LOCATION at the OS level. If denied:
- The merchant list still loads from the API.
- Distance values cannot be calculated.
- The permission warning screen is shown in place of the list, with a button to open device Settings.
Pagination
The Merchant screen uses infinite scroll (fetchNextPage) to load additional merchants when you scroll to the bottom of the list. The list footer shows a loading indicator while the next page is being fetched.
Data source
Merchant data is fetched fromGET /v2/merchant_list. See the Merchants API reference for the full response shape.