FX Rates and Pricing
The Quotes API provides an endpoint that allows you to generate payment requirements for payments you want to make to your beneficiaries with Waza's API.
curl --request POST \
--url https://api.waza.co/api/quote \
--header 'accept: application/json' \
--header 'waza-x-key: your-api-key' \
--header 'content-type: application/json' \
--data '
{
"sendCurrency": "NGN",
"receiveCurrency": "GHS",
"amount": "100000"
}
'
const https = require('https')
const params = JSON.stringify({
"sendCurrency": "NGN",
"receiveCurrency": "GHS",
"amount": "100000"
})
const options = {
hostname: 'api.waza.co',
port: 443,
path: '/api/quotes',
method: 'POST',
headers: {
'x-waza-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
}
}
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.write(params)
req.end()
A successful Quotes API call should return a similar response structure as seen below:
{
"status": "success",
"message": "Quote generated successfully.",
"data": {
"fxRate": 0.03272,
"feeRate": {
"feePercent": 1.5,
"feeCap": 1500
},
"sendCurrency": "NGN",
"receiveCurrency": "GHS",
"dateGenerated": "2022-11-24T14:28:21.525Z",
"sourceAmount": 100000,
"destinationAmount": 3272,
"feeAmount": 1500,
"totalPayableAmount": 101500,
"totalReceivableAmount": 3272
}
}
Updated about 2 months ago