Airtime Premium
Command:
https://mobilenig.com/API/airtime_premium?username=****&api_key=****&network=****&phoneNumber=****&amount=****&trans_id=****&return_url=****
//Replace **** with your username, api_key...
For Api test use https://mobilenig.com/API/airtime_premium_test?username=****&api_key=****&network=****&phoneNumber=****&amount=****&trans_id=****&return_url=****
Api Example: https://mobilenig.com/API/airtime_premium?username=PAUL&api_key=64125agshaii168sdhd4b6bdb5&network=MTN&phoneNumber=08011223344&amount=200&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, amount is 200, price is 196 and trans_id is 12823327903 and return_url=https://mywebsite.com/order_status.asp.
Response:
If successful: A response will be desplayed in JSON format e.g {"trans_id":"12823327903","details":{"network":"MTN","phone_number":"08011223344","amount":"200","price":"196","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 via GET to the return_url provided:
status, phone_number and trans_id
status: Can be Approved or Cancelled
phone_number: The phone number you ordered the airtime_premium for
trans_id: The transaction id you provided.
Query:
https://mobilenig.com/API/airtime_premium_query?username=****&api_key=****&trans_id=****
//Replace **** with your username, api_key...
Api Example: https://mobilenig.com/API/airtime_premium_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","phone_number":"08011223344","amount":"100","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"}