Login to your MTNPlug Account to use this feature
API Integration
Unfortunately, we currently do not have the Sandbox environment where you can do your tests on but don’t get frightened, our HTTPS GET API is very easy to integrate. With the help of our super free API documentation below, you can safely write your codes, believing that it will work and it will work as long as it’s about our simple yet robust API.
API BASE URL
The Live API BASE URL: https://mtnplug.com/wp-json/api/v1/
Authentication
The API uses Basic Authentication. You need to always pass your token as part of the URL parameters.
Request Methods
All requests methods are GET.
Response
All responses from the API are returned in the JSON format.
Available Products and Services on the API include:
MTN DATA
How to Purchase Data (MTN) via HTTP API
Airtime Endpoint URL: https://mtnplug.com/wp-json/api/v1/data
Request Method: GET
Parameters
Field Name | Example Value | Description |
---|---|---|
token | 9d4f89904352767e2f980705 | Unique API Token generated in the Reseller Dashboard |
phone | 07045461790 | The phone number that will receive the airtime |
network | mtn | The network is used to make each network unique. They include mtn. Notice that they are all in small letters. |
size | 1GB | The available data size on the platform 500MB = MTN Data 500MB (SME) – 30 Days |
Example [Purchasing Data]
Sample Response on Success
{"code":"success","message":"Data successfully delivered","data":{"network":"mtn","data_plan":"1gb","phone":"08056708975","amount":"NGN270","order_id":236}}
Sample Response on Failure
{"code":"failure","message":"Insufficient Balance"}