Overview

Routes are the different payments rails available in a country. For instance, GHA has two payment routes: Bank and Mobile.

The routes API provides an endpoint that allows you to fetch all the routes associated to a country gotten from the countries currently supported by Waza's API.

curl --request GET \
     --url https://api.waza.co/api/payment-routes/:countryCode \
     --header 'waza-x-key: your-api-key' \
const https = require('https')

const options = {
  hostname: 'api.waza.co',
  port: 443,
  path: '/api/payment-routes/:countryCode',
  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 Routes API call with GHA should return a similar response structure as seen below:

{
    "status": "success",
    "message": "Routes fetched successfully.",
    "data": [
        {
            "id": 1,
            "countryCode": "GHA",
            "type": "BANK",
            "currency": "GHS"
        },
        {
            "id": 2,
            "countryCode": "GHA",
            "type": "MOBILE",
            "currency": "GHS"
        }
    ]
}

📘

Info

You can use the data from the routes API to fetch the channels associated to each route supported by Waza.