Recharge airtime

Raven atlas api allows you to purchase airtime in the most easy way by making a POST request to the endpoint /airtime/recharge and parsing amount, phone_number and merchant_reference , as shown in the example below

Example Requests

var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
  'amount': '50',
  'phone_number': '070**********',
  'merchant_reference': '12345678' 
});
var config = {
  method: 'post',
  url: 'https://integrations.getravenbank.com/v1/airtime/recharge',
  headers: { },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Example Response

{
  "status": "success",
  "message": "Airtime purchase successful",
  "data": {
    "amount": 50,
    "phone_number": "070***********",
    "network": "MTN",
    "reference": "20220822155329va0ujztr9r606317g9tt3",
    "merchant_ref": "12345678",
    "amount_charged": 49
  }
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!