Login / Register
Business guide · updated 2 Dec 2026

VTU API Nigeria: Start a Data and Airtime Business

A plain guide to using a VTU API to sell data, airtime and bills from your own website or app, with a real example request.

In short · facts checked 2 Dec 2026

A VTU API lets your website or app sell data, airtime, cable TV, electricity tokens and exam PINs automatically, paid from a wallet you fund in advance. With the Gsubz API, you create a Gsubz account, ask support to upgrade it to API level, fund your wallet by bank transfer, copy your API key and send requests to api.gsubz.com Each sale is charged at your API price, which can be lower than the normal price, and you set your own selling price to make profit.

By the Gsubz team · Updated · 7 min read

What is a VTU API?

VTU means virtual top-up. It is how data, airtime and bills are delivered electronically, without scratch cards.

An API is a way for two systems to talk. A VTU API lets your website or app send an order like "send 10GB MTN data to 08031234567" to a provider, and get the result back in seconds. You do not need your own SIMs, network deals or staff sitting by a phone.

It works like this:

  1. You fund a wallet with the provider.
  2. Your customer pays you on your website, app or WhatsApp.
  3. Your system sends the order to the API.
  4. The API delivers the data or airtime and deducts the cost from your wallet.
  5. You keep the difference between your selling price and your API price.

Who a VTU API is for

  • People running a data business who want orders to deliver automatically, day and night.
  • Developers building a VTU website or app for themselves or a client.
  • Businesses that pay staff data or airtime every month.
  • Schools and cafés that sell WAEC, NECO or NABTEB PINs.
  • Anyone who already sells on WhatsApp and is tired of doing every order by hand.

What you can sell through the Gsubz API

All of these are listed in the Gsubz API documentation:

ServiceWhat the API coversExample serviceID
AirtimeMTN, Airtel, Glo, T2 (formerly 9mobile)mtn, airtel, glo, etisalat
DataMTN SME, MTN gifting, Airtel SME, Airtel gifting, Glo SME, Glo corporate gifting, T2mtn_sme, airtel_gifting, glo_sme
Cable TVDStv, GOtv, StarTimes (with smartcard check)dstv, gotv, startimes
Electricity12 DisCos, prepaid and postpaid (with meter check)ikeja-electric, abuja-electric
Exam PINsWAEC, NECO, NABTEBwaec, neco, nabteb
Recharge card PINsMTN, Airtel, Glo, 9mobile, for printingvia /api/generate/
Bulk SMSOne message to up to 5,000 Nigerian numbersvia /api/sms/
OthersTravel eSIMs, game top-ups and gift cards, social media services, products from Chinaown endpoints

The service list in the docs is generated live, so always check it (or call the List All Services endpoint) instead of copying service IDs from old tutorials.

How to get started, step by step

1. Create a Gsubz account

Sign up on gsubz.com or the Gsubz app (Google Play and the Apple App Store). Use an email and phone number you check often.

2. Ask for API-level access

New accounts are not set up for the API by default. Message Gsubz support on WhatsApp (0802 719 7702) or email [email protected] and ask to be upgraded to an API account. API-level accounts get access to the API and cheaper prices. If you call the API before the upgrade, you get a message asking you to chat with admin to get upgraded.

3. Fund your wallet

Every API purchase is paid from your Gsubz wallet. Fund it by bank transfer to your personal account number shown in your dashboard.

4. Copy your API key

Open your API key page at /dashboard/key.php. The key starts with ap_. Treat it like your ATM PIN: anyone with it can spend your wallet.

5. Make a free test call

Check your wallet balance first. It costs nothing and confirms your key works.

curl --location 'https://api.gsubz.com/api/balance/' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--form 'api="YOUR_API_KEY"'

If it works, you get your balance back, for example {"balance": "747.5"}.

6. Make your first real sale

A data sale is three calls: get the plans, buy, then confirm the status. There is no free sandbox. The "Try it live" buttons on the docs page send real requests and spend real money, so test with your own number and the smallest plan.

Example: buy data with one request

First, get the plans for the network. This call is public:

curl --location 'https://api.gsubz.com/api/plans/?service=mtn_sme'

Each plan comes with a value, a normal price and an api_price. The api_price is what you pay through the API.

Then send the purchase. Replace the plan value and phone number with real ones:

curl --location 'https://api.gsubz.com/api/pay/' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--form 'serviceID="mtn_sme"' \
--form 'plan="260"' \
--form 'api="YOUR_API_KEY"' \
--form 'amount=""' \
--form 'phone="08031234567"' \
--form 'requestID="ORDER-10045"'

What each field means, in plain English:

  • serviceID: what you are selling (MTN SME data here).
  • plan: the plan value from the plans list.
  • amount: left empty for data, because the plan sets the price.
  • phone: the customer's 11-digit number.
  • requestID: your own unique order number. Always send one.

The reply tells you status (successful or failed), amountPaid (what came out of your wallet) and your balance before and after. Only give value to your customer when status is successful.

Airtime, cable TV, electricity and exam PINs all use the same /api/pay/ address. Only the fields change. The API docs show each one with PHP, Node.js and Python examples.

What to look for in a VTU API

Before you build your business on any API, check these:

What to checkWhy it matters
Automatic delivery, 24/7Customers buy data at 2am too. Manual delivery loses sales.
Easy wallet fundingBank transfer to a dedicated account number means you can top up any time.
Clear error codesYou need to tell your customer exactly what went wrong.
Transaction status (requery)When a request times out, you must be able to check if it went through.
Duplicate protectionA retry should not charge you or your customer twice.
Plans available by APIPrices change. You should not have to hard-code them.
Real supportWhen a network has issues, you need someone to answer.

The Gsubz API covers these: automatic delivery, bank transfer funding, named error codes like INSUFFICIENT_BALANCE, a Fetch Transaction Status endpoint, duplicate protection with requestID, and a live Get Plans endpoint. Signed webhooks are available for China Store orders; for data, airtime and bills you confirm results with the status endpoint.

Common problems and how to fix them

The transaction failed during network downtime

Networks sometimes have outages. The API returns failed, and a failed purchase does not deliver. Do not mark the order as paid. Tell your customer to try again later, or offer another data type on the same network.

"Insufficient balance"

You get code 402 with INSUFFICIENT_BALANCE. Fund your wallet. Better still, check your balance with the balance endpoint every few hours and top up before it runs low.

Wrong network or wrong number

The API sends to the number you give it. Many Nigerians have ported numbers, so do not guess the network from the first four digits. Let customers pick their network and confirm the number before paying.

The request timed out

This is the big one. A timeout does not mean the purchase failed. Use a client timeout of at least 60 seconds. If you still get no answer, call Fetch Transaction Status (/api/verify/) with the same requestID before trying again.

Duplicate requests

If your customer double-clicks "Pay", you may send two orders. Always send a unique requestID, like your order number. If the same requestID comes in again, Gsubz returns the original result and does not charge you twice.

"Invalid plan"

Code 401 with INVALID_PLAN means the plan value does not match the service. Plans can change, so fetch them from Get Plans instead of saving them forever.

How to build a website or app on top

A PHP website

PHP's cURL is enough. Keep your API key in a config file on your server, never in front-end code.

WordPress

You can add a small custom plugin or a page template that sends your orders to the API from the server. Collect payment first, then call the API, then save the result.

No-code tools

Some automation tools can send an HTTP request from their servers when a form is submitted. This works for small volumes. Make sure the tool keeps your key private.

Mobile apps

Your app should talk to your own server, and your server talks to Gsubz. Never put the API key inside an Android or iPhone app, because it can be extracted.

Let AI help you write the code

The Gsubz docs come in Markdown and OpenAPI versions made for AI tools. Give the link to your AI assistant and ask it to write the integration in your language.

Set your selling price

Your profit is your selling price minus your API price. Look at what customers expect to pay for data first. Our guide to the cheapest data in Nigeria explains SME, gifting and price per GB, and you can compare current data prices on Gsubz.

Ready to start? Read the full Gsubz API documentation, then message support to upgrade your account.

Get the Gsubz API in secondsAutomatic delivery, 24/7. Fund your wallet by bank transfer and pay.

Open Gsubz →

Frequently asked questions

What is a VTU API in Nigeria?

It is a service that lets your website or app sell data, airtime, cable TV, electricity tokens and exam PINs automatically. Orders are paid from a wallet you fund with the provider, and delivery happens in seconds.

How do I get the Gsubz API key?

Create a Gsubz account, ask support to upgrade it to API level, then copy your key from the API key page in your dashboard. The key starts with ap_ and must be kept secret.

Is there a test or sandbox mode?

No free sandbox is listed. Use the free wallet balance call to test your key, then make a small real purchase to your own number.

Can I build a VTU website without coding?

Yes, but you still need something that calls the API from a server, such as a WordPress plugin or an automation tool. Never call the API directly from a browser or mobile app.

What happens if a data purchase fails?

The response shows status failed and the customer should not be given value. If your request timed out, check Fetch Transaction Status with your requestID before retrying.

Which networks does the Gsubz API support?

MTN, Airtel, Glo and T2 (formerly 9mobile) for airtime and data, plus DStv, GOtv, StarTimes, 12 electricity DisCos and WAEC, NECO and NABTEB PINs.

How we check this guide

The Gsubz team checked these facts on 2 Dec 2026, using official sources first (NCC, NERC, the networks, DisCos and exam bodies), then our own transaction records. Prices and codes change, so we update this page when they do.

Sources: Gsubz API documentation · Gsubz API documentation (Markdown version) · Gsubz API OpenAPI specification

Related