The FanitePay Yaka payment API allows you to Pay electricity bills for both Prepaid and Postpaid meters to electricity distribution company (UMEME)
Make an API request to the Yaka verify endpoint to verify the meter number. If successful, you will receive a JSON snippet with details of verification.
Yaka verify:
var axios = require("axios").default;
var options = { method: 'POST', url: '{host}/yaka/verify', headers: { Accept: '*/*', Authorization: 'Bearer FNTPPUBK_LIVE-***************', 'Content-Type': 'application/json' }, data: { acc_no: "4xxxxxxxxx", amount: "0", }};
axios.request(options).then(function (response) { console.log(response.data);}).catch(function (error) { console.error(error);});If successful, a JSON response containing details of the meter will be returned
Response:
{ "CustomerName": "CUSTOMER NAME", "outstanding": "70.82", "type": "PREPAID"}After verifying the yaka meter number, the next step is to make your bill payment. This can be done by making a request to the yaka bill payment endpoint using the following parameters:
Parameters for the Yaka Payment endpoint.
| Field | Description |
|---|---|
| name | Customer Full Names |
| The Customer Email | |
| phone_number | This indicates the phone number of the user where token number shall be sent. |
| billtype | The supported Bill type is umeme |
| type | The supported types is UMEME |
| amount | The indicates the amount to be charged |
| acc_no | The UMEME Yaka meter number |
| currency | Currency is UGX |
Yaka Payment:
var axios = require("axios").default;
var options = { method: 'POST', url: '{host}/utilpay', headers: { Accept: '*/*', Authorization: 'Bearer FNTPPUBK_LIVE-***************', 'Content-Type': 'application/json' }, data: { name: "Customer Name", email: "customer@email.com", phone_number: "07XXXXXXXX", billtype: "umeme", type: "UMEME", amount: "55000", acc_no: "045XXXXXX", currency: "UGX", }};
axios.request(options).then(function (response) { console.log(response.data);}).catch(function (error) { console.error(error);});