post https://integrations.getravenbank.com/v1/electricity/pay
Easily top up your meter
The Atlas API allows you to easily pay for electricity by parsing in the provider
, meter_no
, meter_type
, amount
, merchant_reference
and phone_number
to the request body as shown in the example below.
Example Request
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'provider': 'EKEDC',
'meter_no': '54140454402',
'meter_type': 'prepaid',
'amount': '1000',
'merchant_reference': '123456',
'phone_number': '07039374423'
});
var config = {
method: 'post',
url: 'http://localhost:4000/electricity/pay',
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": "Electricity payment is being processed",
"data": {
"meter_number": "54140454402",
"phone_number": "07039374423",
"reference": "2761819744609277",
"amount": 1000,
"merchant_reference": "123456",
"token": null,
"customer_name": "AGUNBIADE OREOLUWA",
"customer_address": "16 Ola STREET AJAH"
}
}