VTU API for Airtime, Data (MTN SME, Glo, Airtel & 9mobile), Cable TV (DSTv, GOTv & Startimes) Subscription and Electricity Bills Payment in Nigeria
The VTU API is an HTTPS GET API that allows you (developers) to integrate all virtual top-up (VTU) and bill payment services available on the VTU.ng platform with your application (websites, desktop apps & mobile apps). You can also start your own VTU business by integrating our VTU API and reselling our services in Nigeria.
As an API user, you will enjoy even cheaper prices. You will get 1GB at ₦449; 3% discounts on airtime; 1.5% discounts on cable TV subscription; 1% discounts on electricity bills payment; and ₦0.00 service fees. Please see pricing for more information.
Alright, let me tell you. We have built an internal infrastructure for the best SIM hosting capabilities. We have many SIMs internally hosted on our dedicated server. These SIMs automatically get VTU requests in milliseconds and they constantly deliver our VTU services instantly by dialling the required USSD codes and sending SMSs where necessary. We have also connected our cable TV subscription and electricity bill payment services directly to the providers’ gateways (Premium Direct Connections). We also leverage direct connections to banks where necessary. Now you truly know why we are cheap and reliable.
Here, you will get all premium recharge APIs. From airtime vending API (recharge cards API) to data reselling API to bills payment API. All failed orders are refunded automatically. We are unarguably the best VTU API provider in Nigeria.
We now have a more Powerful and Robust (v2) REST API
Note: You must have a reseller account with us to use our API.
Contents
API Integration
API BASE URL
Authentication
Request Methods
Response
Available Products and Services on the VTU.ng API
How to Get VTU.ng Wallet Balance via VTU.ng HTTP API
– Parameters
– Example [Getting Wallet Balance]
– Sample Response on Success
– Sample Response on Failure
How to Purchase Airtime via VTU.ng HTTP API
– Parameters
– Example [Purchasing Airtime]
– Sample Response on Success
– Sample Response on Failure
How to Purchase Data via VTU.ng HTTP API
– Parameters
– Example [Purchasing Data]
– Sample Response on Success
– Sample Response on Failure
How to Verify Customers via VTU.ng HTTP API
– Parameters
– Example [Verifying Customers]
– Sample Response on Success
– Sample Response on Failure
How to Purchase Cable TV via VTU.ng HTTP API
– Parameters
– Example [Purchasing Cable TV]
– Sample Response on Success
– Sample Response on Failure
How to Purchase Electricity via VTU.ng HTTP API
– Parameters
– Example [Purchasing Electricity]
– Sample Response on Success
– Sample Response on Failure
Response Codes
API Integration
Unfortunately, we currently do not have the Sandbox environment where you can do your tests but don’t get frightened, our HTTPS GET API is very easy to integrate. With the help of our super free VTU 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://vtu.ng/wp-json/api/v1/
Authentication
The VTU.ng API uses Basic Authentication. You need to always pass your username and password as part of the URL parameters. Your connection is secure.
Request Methods
All request methods are GET. You can also use cURL.
Response
All responses from the VTU.ng API are returned in JSON format.
Available Products and Services on the VTU.ng API include:
- Balance
- Airtime
- Data
- Customer Verification
- Cable TV
- Electricity
How to Get VTU.ng Wallet Balance via VTU.ng HTTP API
Wallet Balance Endpoint URL: https://vtu.ng/wp-json/api/v1/balance
Request Method: GET
Parameters
Field Name | Example Value | Description |
---|---|---|
username | Frank | The login username/email for your VTU.ng account |
password | 123456 | The login password for your VTU.ng account |
Example [Getting Wallet Balance]
https://vtu.ng/wp-json/api/v1/balance?username=Frank&password=123456
Sample Response on Success
{"code":"success","message":"Wallet balance successfully retrieved","data":{"balance":"120067.65","currency":"NGN"}}
Sample Response on Failure
{"code":"invalid_username","message":"Unknown username. Check again or try your email address.","data":null}
Airtime Recharge API – How to Purchase Airtime (MTN, Glo, Airtel & 9mobile) via VTU.ng HTTP API
Airtime Endpoint URL: https://vtu.ng/wp-json/api/v1/airtime
Request Method: GET
Parameters
Field Name | Example Value | Description |
---|---|---|
username | Frank | The login username/email for your VTU.ng account |
password | 123456 | The login password for your VTU.ng account |
phone | 07045461790 | The phone number that will receive the airtime |
network_id | mtn | The network_id is used to make each network unique. They include mtn, glo, airtel and etisalat. Notice that they are all in small letters. |
amount | 2000 | The amount of airtime you want to purchase |
Example [Purchasing Airtime]
Sample Response on Success
{"code":"success","message":"Airtime successfully delivered","data":{"network":"MTN","phone":"07045461790","amount":"NGN2000","order_id":"3100"}}
Sample Response on Failure
{"code":"failure","message":"Your wallet balance (NGN1067.65) is insufficient to make this airtime purchase of NGN2000","order_id":"3289"}
Data Reseller API – How to Purchase Data (MTN, Glo, Airtel & 9mobile) via VTU.ng HTTP API
This endpoint provides you with the ultimate solution to all your data API questions like CG Data API; MTN SME Data Reseller API; Airtel Edusuite Corporate Data Gifting API; Glo Corporate Data Gifting API; MTN Corporate Data Gifting API; Airtel SME Data API; 9mobile Corporate Data Gifting API; Glo SME Data API.
Data Endpoint URL: https://vtu.ng/wp-json/api/v1/data
Request Method: GET
Parameters
Field Name | Example Value | Description |
---|---|---|
username | Frank | The login username/email for your VTU.ng account |
password | 123456 | The login password for your VTU.ng account |
phone | 07045461790 | The phone number that will receive the data |
network_id | mtn | The network_id is used to make each network unique. They include mtn, glo, airtel and etisalat. Notice that they are all in small letters. |
variation_id | 2676 | The variation ID of the data plan you want to purchase. They are as follows: MTN Data Variation IDs 2667 = 75GB – 30 Days 2673 = 36GB – 30 Days 244540 = 16.5GB – 30 Days 2677 = 10GB + 10 mins – 30 Days 244538 = 7GB – 30 Days 5506738 = 3.5GB + 5 mins – 30 Days 244542 = 2GB + 2 mins – 30 Days 2676 = 1GB + 5 mins – 7 Days 5506674 = 1GB + 1.5 mins – 1 Day Glo Data Variation IDs 2251529 = 500MB (SME) – 30 Days 2251528 = 1GB (SME) – 30 Days 2251526 = 2GB (SME) – 30 Days 2251525 = 3GB (SME) – 30 Days 2251523 = 5GB (SME) – 30 Days 2251521 = 10GB (SME) – 30 Days Airtel Data Variation IDs 2668 = 60GB – 30 Days 2669 = 35GB – 30 Days 2670 = 18GB – 30 Days 2674 = 10GB – 30 Days 2675 = 6GB – 30 Days 244721 = 3GB – 30 Days 2672 = 2GB – 30 Days 244698 = 1GB – 7 Days 9mobile Data Variation IDs 2664 = 1.4GB – 30 Days 2787 = 2.44GB – 30 Days 2662 = 3.91GB – 30 Days 2793 = 5.10GB – 30 Days 2792 = 16GB – 30 Days 2791 = 78GB – 90 Days Please see the Data Product page for the exact current prices. Kindly ensure you are logged in as a reseller to see the reseller/API prices. |
ported | Yes | This is an optional field that specifies whether a phone number was ported from its original network to another. Yes = Phone Number was ported (the phone number validation system would be bypassed) No = Phone Number is not ported (optional) |
Example [Purchasing Data]
Sample Response on Success
{"code":"success","message":"Data successfully delivered","data":{"network":"MTN","data_plan":"MTN 1GB + 5 mins - 7 Days","phone":"07045461790","amount":"NGN259","order_id":"2443"}}
Sample Response on Failure
{"code":"failure","message":"Invalid data variation_id. Please, crosscheck and enter the correct variation_id.","order_id":"3456"}
Meter Number and IUC/Smartcard Number Verification API – How to Verify Customers via VTU.ng HTTP API
We advise that you always verify the customer’s details before submitting requests to purchase the service (cable TV or electricity). The VTU.ng customer verification endpoint allows you to get the customer’s full name, address, and many more.
Customer Verification Endpoint URL: https://vtu.ng/wp-json/api/v1/verify-customer
Request Method: GET
Parameters
Field Name | Example Value | Description |
---|---|---|
username | Frank | The login username/email for your VTU.ng account |
password | 123456 | The login password for your VTU.ng account |
customer_id | 62418234034 | This is either the customer’s smartcard number or the meter number |
service_id | ikeja-electric | The service_id is unique for all cable TV and electricity services. They include dstv, gotv, startimes, abuja-electric, eko-electric, ibadan-electric, ikeja-electric, jos-electric, kaduna-electric, kano-electric and portharcout-electric. Notice that they are all in small letters. |
variation_id | prepaid | The meter type (prepaid or postpaid) of the electricity company. This is only required for verifying the electricity customers and not required for cable TV customer verification. |
Example [Verifying Customers]
Sample Response on Success
{"code":"success","message":"Customer details successfully retrieved","data":{"customer_id":"62418234034","customer_name":"FIRSTNAME LASTNAME","customer_address":"10 Example Street, Town, State","customer_arrears":"0.00","decoder_status":null,"decoder_due_date":null,"decoder_balance":null}}
Sample Response on Failure
{"code":"failure","message":"Invalid Meter Number"}
Cable TV Bills Payment API – How to Purchase/Subscribe Cable TV (DSTv, GOTv & Startimes) via VTU.ng HTTP API
Cable TV Endpoint URL: https://vtu.ng/wp-json/api/v1/tv
Request Method: GET
Parameters
Field Name | Example Value | Description |
---|---|---|
username | Frank | The login username/email for your VTU.ng account. |
password | 123456 | The login password for your VTU.ng account. |
phone | 07045461790 | The phone number that will be stored for reference. REQUIRED |
service_id | gotv | The service_id is used to make each cable TV unique. They include dstv, gotv, and startimes. Notice that they are all in small letters. |
smartcard_number | 7032400086 | The smartcard/IUC number of the decoder that should be subscribed. |
variation_id | gotv-max | The variation ID of the cable TV package/bouquet you want to purchase. They are as follows: dstv-padi = DStv Padi dstv-yanga = DStv Yanga dstv-confam = DStv Confam dstv6 = DStv Asia dstv79 = DStv Compact dstv7 = DStv Compact Plus dstv3 = DStv Premium dstv10 = DStv Premium Asia dstv9 = DStv Premium-French confam-extra = DStv Confam + ExtraView yanga-extra = DStv Yanga + ExtraView padi-extra = DStv Padi + ExtraView com-asia = DStv Compact + Asia dstv30 = DStv Compact + Extra View dstv33 = DStv Premium – Extra View dstv45 = DStv Compact Plus – Extra View frenchplus-addon = DStv French Plus Add-on asia-addon = DStv Asian Add-on frenchtouch-addon = DStv French Touch Add-on extraview-access = ExtraView Access gotv-smallie = GOtv Smallie gotv-jinja = GOtv Jinja gotv-jolli = GOtv Jolli gotv-max = GOtv Max gotv-supa = GOtv Supa nova = Startimes Nova basic = Startimes Basic smart = Startimes Smart classic = Startimes Classic super = Startimes Super Please see the cable TV pricing. |
Example [Purchasing Cable TV]
Sample Response on Success
{"code":"success","message":"Cable TV subscription successfully delivered","data":{"cable_tv":"GOtv","subscription_plan":"GOtv Max","smartcard_number":"7032400086","phone":"07045461790","amount":"NGN3280","amount_charged":"NGN3247.2","service_fee":"NGN0.00","order_id":"2876"}}
Sample Response on Failure
{"code":"failure","message":"Invalid Smartcard Number","order_id":"3652"}
Electricity Bills Payment API – How to Purchase/Pay Electricity Bills in Nigeria via VTU.ng HTTP API
You can purchase electricity through our API and get an instant token for prepaid meters.
Electricity Endpoint URL: https://vtu.ng/wp-json/api/v1/electricity
Request Method: GET
Parameters
Field Name | Example Value | Description |
---|---|---|
username | Frank | The login username/email for your VTU.ng account |
password | 123456 | The login password for your VTU.ng account |
phone | 07045461790 | The phone number that will be stored for reference. REQUIRED |
meter_number | 62418234034 | The meter number you want to purchase electricity for |
service_id | ikeja-electric | The service_id is used to make each electricity company unique. They are as follows: abuja-electric = Abuja Electricity Distribution Company (AEDC) eko-electric = Eko Electricity Distribution Company (EKEDC) ibadan-electric = Ibadan Electricity Distribution Company (IBEDC) ikeja-electric = Ikeja Electricity Distribution Company (IKEDC) jos-electric = Jos Electricity Distribution PLC (JEDplc) kaduna-electric = Kaduna Electricity Distribution Company (KAEDCO) kano-electric = Kano Electricity Distribution Company (KEDCO) portharcourt-electric = Port Harcourt Electricity Distribution Company (PHED) |
variation_id | prepaid | The meter type of electricity company you want to purchase. It is either prepaid or postpaid |
amount | 8000 | The amount of electricity you want to purchase |
Example [Purchasing Electricity]
Sample Response on Success
{"code":"success","message":"Electricity bill successfully paid","data":{"electricity":"Ikeja (IKEDC)","meter_number":"62418234034","token":"Token: 5345 8765 3456 3456 1232","units":"47.79kwH","phone":"07045461790","amount":"NGN3000","amount_charged":"NGN2970","order_id":"4324"}}
Sample Response on Failure
{"code":"failure","message":"Invalid Meter Number","order_id":"3907"}
Response Codes
Code | Description |
---|---|
success | The order succeeded and was delivered. |
processing | The order is currently processing. It may still be delivered or refunded. |
failure | The order failed and your VTU.ng wallet was refunded automatically. |
empty_username | The username field is empty. |
empty_password | The password field is empty. |
invalid_username | Unknown username. Check again or try your email address. |
Incorrect_password | The password you entered for the username is incorrect. |