VTU API Documentation for Airtime, Data, Cable TV and Electricity in Nigeria

The VTU.ng API is an HTTPs GET API that allows you to integrate all virtual top-up and bills payment services available on our platform with your application (websites, desktop apps & mobile apps). You can also start your own VTU business by integrating our VTU API and resell our services in Nigeria.

As an API user, you will enjoy even cheaper prices. You will get 1GB at ₦319; 3% discounts on airtime; 1.5% discounts on cable TV; 1% discounts on electricity; 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 over 100 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.

Note: You must have an account with us to use our API.

Register Now

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 on but don’t freight, our HTTPs GET API is very easy to integrate. 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.

Request Methods

All requests methods are GET.

Response

All responses from the VTU.ng API are returned in the JSON format.

Available Products and Services on the VTU.ng API include:

  1. Balance
  2. Airtime
  3. Data
  4. Customer Verification
  5. Cable TV
  6. 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 NameExample ValueDescription
usernameFrankThe login username/email for your VTU.ng account
password123456The 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}

How to Purchase Airtime via VTU.ng HTTP API

Airtime Endpoint URL: https://vtu.ng/wp-json/api/v1/airtime

Request Method: GET

Parameters

Field NameExample ValueDescription
usernameFrankThe login username/email for your VTU.ng account
password123456The login password for your VTU.ng account
phone07045461790The phone number that will receive the airtime
network_idmtnThe network_id is used to make each network unique. They include mtn, glo, airtel and etisalat. Notice that they are all in small letters.
amount2000The amount of airtime you want to purchase

Example [Purchasing Airtime]

https://vtu.ng/wp-json/api/v1/airtime?username=Frank&password=123456&phone=07045461790&network_id=mtn&amount=2000

Sample Response on Success

{"code":"success","message":"Airtime successfully delivered","data":{"network":"MTN","phone":"07045461790","amount":"NGN2000","request_id":"4251595492185226"}}

Sample Response on Failure

{"code":"failure","message":"Your wallet balance (NGN1067.65) is insufficient to make this airtime purchase of NGN2000"}

How to Purchase Data via VTU.ng HTTP API

Data Endpoint URL: https://vtu.ng/wp-json/api/v1/data

Request Method: GET

Parameters

Field NameExample ValueDescription
usernameFrankThe login username/email for your VTU.ng account
password123456The login password for your VTU.ng account
phone07045461790The phone number that will receive the data
network_idmtnThe 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_idM1024The variation ID of the data plan you want to purchase. They are as follows:
M1024 = MTN Data 1GB (SME) – 30 Days
M2024 = MTN Data 2GB (SME) – 30 Days
GIFT500 = MTN Data 2.5GB (Direct) – 30 Days
5000 = MTN Data 5GB (SME) – 30 Days
GIFT8000 = MTN Data 8GB (Direct) – 30 Days
GIFT5000 = MTN Data 15GB (Direct) – 30 Days
G500 = Glo Data 1GB – 14 Days
G2000 = Glo Data 5.8GB – 30 Days
G1000 = Glo Data 2GB/2.5GB – 30 Days
G2500 = Glo Data 7.7GB – 30 Days
G3000 = Glo Data 10GB – 30 Days
G4000 = Glo Data 13.25GB – 30 Days
G5000 = Glo Data 18.25GB – 30 Days
G8000 = Glo Data 20GB/25GB – 30 Days
AIR1000 = Airtel Data 1.5GB – 30 Days
Air1200 = Airtel Data 2GB – 30 Days
Air1500 = Airtel Data 3GB – 30 Days
AIR2000 = Airtel Data 4.5GB – 30 Days
AIR2500 = Airtel Data 6GB – 30 Days
Air3000 = Airtel Data 8GB – 30 Days
Air5000 = Airtel Data 15GB – 30 Days
Air100000 = Airtel Data 40GB – 30 Days
9MOB1000 = 9mobile Data 1.5GB – 30 Days
9MOB2000 = 9mobile Data 2GB – 30 Days
9MOB3000 = 9mobile Data 3GB – 30 Days
9MOB34500 = 9mobile Data 4.5GB – 30 Days
9MOB4000 = 9mobile Data 11GB – 30 Days
9MOB5000 = 9mobile Data 15GB – 30 Days
9MOB40000 = 9mobile Data 40GB – 30 Days

Example [Purchasing Data]

https://vtu.ng/wp-json/api/v1/data?username=Frank&password=123456&phone=07045461790&network_id=mtn&variation_id=M1024

Sample Response on Success

{"code":"success","message":"Data successfully delivered","data":{"network":"MTN","data_plan":"MTN Data 1GB (SME) – 30 Days","phone":"07045461790","amount":"NGN319","request_id":"fb69ed8a39ac5684"}}

Sample Response on Failure

{"code":"failure","message":"Invalid data variation_id. Please, crosscheck and enter the correct variation_id."}

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.

Customer Verification Endpoint URL: https://vtu.ng/wp-json/api/v1/verify-customer

Request Method: GET

Parameters

Field NameExample ValueDescription
usernameFrankThe login username/email for your VTU.ng account
password123456The login password for your VTU.ng account
customer_id62418234034This is either the customer’s smartcard number or the meter number
service_idikeja-electricThe 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_idprepaidThe meter type of the electricity company. This is only required for verifying the electricity customers and not required for cable TV customer verification.

Example [Verifying Customers]

https://vtu.ng/wp-json/api/v1/verify-customer?username=Frank&password=123456&customer_id=62418234034&service_id=ikeja-electric&variation_id=prepaid

Sample Response on Success

{"code":"success","message":"Customer details successfully retrieved","data":{"customer_id":"62418234034","customer_name":"FIRSTNAME LASTNAME"}}

Sample Response on Failure

{"code":"failure","message":"Invalid Meter Number"}

How to Purchase Cable TV via VTU.ng HTTP API

Cable TV Endpoint URL: https://vtu.ng/wp-json/api/v1/tv

Request Method: GET

Parameters

Field NameExample ValueDescription
usernameFrankThe login username/email for your VTU.ng account
password123456The login password for your VTU.ng account
phone07045461790The phone number that will be stored for reference
service_idgotvThe 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_number7032400086The smartcard/IUC number of the decoder that should be subscribed
variation_idgotv-maxThe variation ID of the cable TV package/bouquet you want to purchase. They are as follows:
dstv-greatwall = DStv Great Wall
dstv-padi = DStv Padi
dstv-yanga = DStv Yanga
dstv-confam = DStv Confam
dstv6 = DStv Asian
dstv79 = DStv Compact
dstv7 = DStv Compact Plus
dstv3 = DStv Premium
dstv10 = DStv Premium Asia
gotv-lite = GOtv Lite
gotv-jinja = GOtv Jinja
gotv-jolli = GOtv Jolli
gotv-max = GOtv Max
nova = Startimes Nova
basic = Startimes Basic
smart = Startimes Smart
classic = Startimes Classic
super = Startimes Super

Example [Purchasing Cable TV]

https://vtu.ng/wp-json/api/v1/tv?username=Frank&password=123456&phone=07045461790&service_id=gotv&smartcard_number=7032400086&variation_id=gotv-max

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","request_id":"4251595492182356"}}

Sample Response on Failure

{"code":"failure","message":"Invalid Smartcard Number"}

How to Purchase Electricity via VTU.ng HTTP API

You can purchase electricity through our API and get instant token for prepaid meters.

Electricity Endpoint URL: https://vtu.ng/wp-json/api/v1/electricity

Request Method: GET

Parameters

Field NameExample ValueDescription
usernameFrankThe login username/email for your VTU.ng account
password123456The login password for your VTU.ng account
phone07045461790The phone number that will be stored for reference
meter_number62418234034The meter number you want to purchase electricity for
service_idikeja-electricThe 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_idprepaidThe meter type of electricity company you want to purchase. It is either prepaid or postpaid
amount8000The amount of electricity you want to purchase

Example [Purchasing Electricity]

https://vtu.ng/wp-json/api/v1/electricity?username=Frank&password=123456&phone=07045461790&meter_number=62418234034&service_id=ikeja-electric&variation_id=prepaid&amount=8000

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","phone":"07045461790","amount":"NGN8000","amount_charged":"NGN7920","request_id":"4251595499876226"}}

Sample Response on Failure

{"code":"failure","message":"Invalid Meter Number"}

Response Codes

CodeDescription
successTransaction succeeded.
failureTransaction failed.
invalid_usernameUnknown username. Check again or try your email address.
Incorrect_passwordError: The password you entered for the username is incorrect.