Eko Prepaid :: API

Eko Electricity Distribution Prepaid

User Validation:

A customer must be validated before processing subscription. This will return the account status and associated information such as the customer's name, minimumAmount, customerType, name, meterType, thirdPartyCode, email and phone number. Request can be made using the smart card number.

Command: https://mobilenig.com/API/bills/user_check?username=****&api_key=****&service=****&number=****
//where username: Use your MobileNig Username, api_key: Your api_key, service: EKO_PREPAID, number: meterNumber.

You can use this meter number 07080259851 for testing on EKO_PREPAID
EKO_PREPAID JSON return format:
{"details":{"customerAddress":"SHOLAJA ST, VICTORY EST, 5A, IBA","customerDistrict":"OJO","responseMessage":"Request Successful","customerName":"SUNDAY AGAGARAGA","status":true,"responseCode":0}}

In most cases the initial response will be an error stating that the transaction is still pending (Error Code: ERR108). In order to resolve the issue it is required to call the Query method. The transaction should be resolved within 2 minutes.


Parameters:

Parameter_Name Type Description
username String Your MobileNig username
api_key String The api_key generated on MobileNig
customerAddress String Customer address gotten from user validation
customerDistrict String customerDistrict gotten from user validation
customerName String Customer's name gotten from user validation
meterNumber Number Meter number
amount number Amount of electricity bills e.g 2000
trans_id Number Unique transaction id e.g 71836382871981

Command:

https://mobilenig.com/API/bills/eko_prepaid?username=****&api_key=****&customerAddress=****&customerDistrict=****&customerName=****&meterNumber=****&amount=****&trans_id=****
//Replace **** with your username, api_key...

For Api test use https://mobilenig.com/API/bills/eko_prepaid_test?username=****&api_key=****&customerAddress=SHOLAJA ST, VICTORY EST, 5A, IBA&customerDistrict=OJO&customerName=SUNDAY AGAGARAGA&meterNumber=07080259851&amount=1000&trans_id=71836382871981
Api Example: https://mobilenig.com/API/bills/eko_prepaid?username=PAUL&api_key=64125agshaii168sdhd4b6bdb5&customerAddress=SHOLAJA ST, VICTORY EST, 5A, IBA&customerDistrict=OJO&customerName=SUNDAY AGAGARAGA&meterNumber=07080259851&amount=1000&trans_id=71836382871981
//where username is PAUL and api_key is 64125agshaii168sdhd4b6bdb5, customerAddress is SHOLAJA ST, VICTORY EST, 5A, IBA, customerDistrict is OJO, customerName is SUNDAY AGAGARAGA, meterNumber is 07080259851, amount is 1000, and trans_id is 71836382871981.

Response:
If successful: A response will be desplayed in JSON format e.g {"trans_id":"71836382871981","details":{"bsstTokenValue":"17817698268396126441","fixedTariff":"Fixed","standardTokenValue":"66092883209521664225","bsstTokenDescription":"FBE Token","utilityAddress":null,"utilityName":null,"bsstTokenDate":"2019-05-26T14:29:38+01:00","utilityTaxReference":null,"utilityDistrictId":null,"package":"#1000 Eko Electricity Distribution Prepaid","amount":"1000","status":"SUCCESSFUL","balance":"4620"}}
Else, one of the responses below will be displayed in this format {"code": "ERR101", "description": "Invalid username or api_key"}

Responses:

Code Description
ERR101 Invalid username or api_key
ERR102 Api service is currently unavailable
ERR103 Requested service is currently unavailable
ERR104 User Suspended
ERR105 Transaction id already exist, kindly generate a unique id
ERR106 Insufficient Balance
ERR107 Transaction Unsuccessful
ERR108 Transaction is pending, kindly query to get transaction status
ERR202 Incomplete Parameters
ERR206 Duplicate transaction, same order details had been made few minutes ago

Query:

https://mobilenig.com/API/eko_prepaid_query?username=****&api_key=****&trans_id=****
//Replace **** with your username, api_key...
Api Example: https://mobilenig.com/API/eko_prepaid_query?username=PAUL&api_key=64125agshaii168sdhd4b6bdb5trans_id=71836382871981
//where username is PAUL and api_key is 64125agshaii168sdhd4b6bdb5, trans_id is 71836382871981.

Response:
If successful: A response will be desplayed in JSON format e.g {"trans_id":"71836382871981","details":{"bsstTokenValue":"17817698268396126441","fixedTariff":"Fixed","standardTokenValue":"66092883209521664225","bsstTokenDescription":"FBE Token","utilityAddress":null,"utilityName":null,"bsstTokenDate":"2019-05-26T14:29:38+01:00","utilityTaxReference":null,"utilityDistrictId":null,"package":"#1000 Eko Electricity Distribution Prepaid","amount":"1000","status":"SUCCESSFUL"}}
Else, response will be displayed in this format {"code": "ERR204", "description": "Could't find transaction on MobileNig"}