Channels
Overview
Channels are the different options available for a payment route. For instance, GHA's Mobile route has channels like MTN, Airtel and Vodafone.
The channels API provides an endpoint that allows you to fetch all the channels associated to a route gotten from the routes currently supported by Waza's API.
curl --request GET \
--url https://api.waza.co/api/payment-channels/:routeId \
--header 'waza-x-key: your-api-key' \
const https = require('https')
const options = {
hostname: 'api.waza.co',
port: 443,
path: '/api/payment-channels/:routeId',
method: 'GET',
headers: {
'x-waza-key': 'YOUR-API-KEY',
}
}
const req = https.request(options, res => {
let data = ''
res.on('data', (chunk) => {
data += chunk
});
res.on('end', () => {
console.log(JSON.parse(data))
})
}).on('error', error => {
console.error(error)
})
req.end()
A successful Channels API call should return a similar response structure as seen below:
{
"status": "success",
"message": "Channels fetched successfully.",
"data": [
{
"id": 1,
"countryCode": "GHA",
"code": "MTN",
"name": "MTN",
"routeId": 1
},
{
"id": 2,
"countryCode": "GHA",
"code": "ARTLTIGO",
"name": "Airtel",
"routeId": 1
},
{
"id": 3,
"countryCode": "GHA",
"code": "VODAFONE",
"name": "Vodafone",
"routeId": 1
}
]
}
Info
You can use the data from the routes API to fetch the channels associated to each route supported by Waza.
Updated 10 months ago