Discover available providers
GET
/api/global/discovery/payment-world/country
curl -X GET "https://api.payhero.africa/api/global/discovery/payment-world/country?country=KE" \ -u "API_USERNAME:API_PASSWORD"<?php$ch = curl_init("https://api.payhero.africa/api/global/discovery/payment-world/country?country=KE");$options = [ CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_USERPWD => "API_USERNAME:API_PASSWORD",];curl_setopt_array($ch, $options);$response = curl_exec($ch);curl_close($ch);echo $response;import requests
response = requests.get( "https://api.payhero.africa/api/global/discovery/payment-world/country", auth=("API_USERNAME", "API_PASSWORD"), params={ "country": "KE", },)print(response.json())const auth = Buffer.from("API_USERNAME:API_PASSWORD").toString("base64");
const response = await fetch("https://api.payhero.africa/api/global/discovery/payment-world/country?country=KE", { method: "GET", headers: { Authorization: `Basic ${auth}`, },});
const data = await response.json();console.log(data);Returns the payment rails, providers and networks available for a given
country, so you can decide which provider / provider_config to use.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”country
required
string
Example
KEISO 3166-1 alpha-2 country code.
Responses
Section titled “Responses”Available providers for the country.
Media typeapplication/json
object
rails
object
bank
boolean
card
boolean
momo
boolean
merchant_id
string
has_networks
boolean
country
string
currency
string
available_providers
object
bank
Array<string>
card
Array<string>
momo
Array<string>
provider_networks
object
key
additional properties
any
Example
{ "rails": { "bank": true, "card": false, "momo": true }, "merchant_id": "", "has_networks": true, "country": "KE", "currency": "KES", "available_providers": { "bank": [ "i&m", "absa", "equity", "dtb", "standard_chartered", "stanbic", "kcb" ], "card": [], "momo": [ "bitlipa", "yellowcard", "m-pesa", "mpesa_dc", "sasapay" ] }}Missing or invalid Basic auth credentials.
Media typeapplication/json
object
error_code
string
error_message
string
status_code
integer
Example
{ "error_code": "invalid_argument", "error_message": "the transaction amount is insufficient as it wont cater for cost: (4.62)", "status_code": 400}
