Nearest SasaPay Agents
As a SasaPay merchant, we provide you an endpoint to enable your beneficiaries locate SasaPay agents near them. To locate the nearest agents, you need to provide two crucial query parameters and that is the user's current location's longitude and latitude coordinates.
Endpoint: https://sandbox.sasapay.app/api/v2/waas/nearest-agent/?Longitude=00.00000&Latitude=00.00000
Query Parameters
Field | Type | Description | Examples |
---|---|---|---|
Longitude | Float | This the current user location's distance east or west from an imaginary line connecting the North and South Poles. | 40.98888 |
Latitude | Float | This the current user location's distance north or south of the equator. | 50.00000 |
Sample Request
Headers
Key: Authorization
Value: Bearer Q1k2RW5SOGlsYUZnRzNGMk1DNIyZWlDS3VrTFhVV0xScFVHYQ==
Response Parameters
Field | Type | Description | Examples |
---|---|---|---|
statusCode | Numeric | This is a numeric status code that indicates the status of the response. 0 means success and any other code means an error occurred or the request failed.Please refer to the response codes table above. | 0 |
message | String | Status of the request generated by SasaPay API. | Record Retrieved successfully |
nearest_agents | List | This is the list of all agents that are close to the user's location. | [] |
Sample response
{
"statusCode": "0",
"message": "Record Retrieved successfully",
"nearest_agents": [
{
"distance": 1518.5186179716159,
"id": 2030,
"description": "Eins Fintech",
"longitude": "-1.2827683",
"latitude": "36.8157532",
"area_name": "51748 Uhuru Hwy, Nairobi Central, Nairobi, , Kenya"
},
]