Data :: API

Data

Parameters:

Parameter_Name Type Description
username String Your MobileNig username
api_key String The api_key generated on MobileNig
network String MTN, 9MOBILE or GLO (UPPERCASE)
phoneNumber Number The beneficiary (080*** format)
product_code String product code as shown here
price Number price of product_code to order for e.g MTN 1GB is 470
trans_id Number Unique transaction id e.g 12823327903
return_url String Provide the url for order status e.g https://mywebsite.com/order_status.asp

Command:

https://mobilenig.com/API/data?username=****&api_key=****&network=****&phoneNumber=***&product_code****&price=****&trans_id=****&return_url=****
//Replace **** with your username, api_key...

For Api test use https://mobilenig.com/API/data_test?username=****&api_key=****&network=****&phoneNumber=***&product_code****&price=****&trans_id=****&return_url=****
Api Example: https://mobilenig.com/API/data?username=PAUL&api_key=64125agshaii168sdhd4b6bdb5&network=MTN&phoneNumber=08011223344&product_code=MTN1GB&price=470&trans_id=12823327903&return_url=https://mywebsite.com/order_status.asp
//where username is PAUL and api_key is 64125agshaii168sdhd4b6bdb5, network is MTN, beneficiary is 08011223344, product_code is MTN1GB, price is 470 and trans_id is 12823327903.

Response:
If successful: A response will be desplayed in JSON format e.g {"trans_id":"12823327903","details":{"network":"MTN","data_volume":"1GB","phone_number":"08011223344","price":"470","status":"Pending","balance":"3000"}}
Else, one of the responses below will be displayed in this format {"code": "ERR101", "description": "Invalid username or api_key"}


These parameters will be returned in the return_url:

status, beneficiary and ref
status: Can be Approved or Cancelled
beneficiary: The phone number you ordered the data plan for
ref: The reference number you provided.

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
ERR201 Amount is less than 50
ERR202 Incomplete Parameters
ERR205 Invalid network
ERR206 Duplicate transaction, same order details had been made few minutes ago
ERR207 Invalid recipient number
ERR208 Product code does not tally with price

Query:

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

Response:
If successful: A response will be desplayed in JSON format e.g {"trans_id":"12823327903","details":{"network":"MTN","data_volume":"1GB","phone_number":"08011223344","price":"470","status":"Approved"}}
//Status can either be Pending, Approved or Cancelled
Else, response will be displayed in this format {"code": "ERR204", "description": "Could't find transaction on MobileNig"}

MTN:

Data Volume Product_code Price
1GB MTN1GB 455
2GB MTN2GB 910
5GB MTN5GB 2275

9MOBILE:

Data Volume Product_code Price
250MB MOB250 250
500MB MOB500 350
1GB MOB1GB 650
1.5GB MOB1O5GB 1000
2GB MOB2GB 1250
3GB MOB3GB 1900
5GB MOB5GB 3100
11.5GB MOB11O5GB 7000
15GB MOB15GB 8850
27.5GB MOB27O5GB 16000

GLO:

Data Volume Product_code Price
1.6GB or 2GB GLO2GB 900
3.65GB or 4.5GB GLO4O5GB 1800
5.75GB or 7.2GB GLO7O2GB 2250
7GB or 8.25GB GLO8O25GB 2650
10GB or 12.5GB GLO12O5GB 3550
12.5GB or 15.6GB GLO15O6GB 4450
20GB or 25GB GLO25GB 7000
26GB or 32.5GB GLO32O5GB 8600
42GB or 52.5GB GLO52O5GB 13000