API Reference
Welcome to the AyGlobal Data API. Our RESTful architecture allows you to seamlessly integrate VTU purchases, bill payments, KYC verifications, and business registrations directly into your applications.
The API relies on standard HTTP methods, accepts application/json request bodies, and returns JSON-encoded responses.
Base URL
{
"status": "success",
"transaction_ref": "DAT_171000",
"amount_paid": 280,
"previous_balance": 5000,
"new_balance": 4720
}
Authentication
Authenticate your API requests by including your secret API key in the HTTP headers. You can retrieve your API key from the developer section of your dashboard.
Never share your API key publicly or commit it to client-side code (like frontend JavaScript).
Authorization: Token YOUR_API_KEY_HERE Content-Type: application/json
User Details & Balance
Retrieve your account profile and verify your current wallet balance before making transactions.
Requires your API token in the Authorization header. Returns the user profile, wallet balance, referral bonus and the most recent transactions in one request.
{
"status": "success",
"data": {
"user": {
"fname": "John",
"email": "john@example.com",
"phone": "08012345678",
"balance": "5000.00",
"bonus": "200.00",
"welcome_bonus": "1"
},
"transactions": [
{ "servicename": "Data", "amount": 700, "status": "Success" }
]
}
}
Pricing & Product List
Fetch available products and prices per service. Each endpoint returns the networks, bundles and plan IDs you will use in purchase requests.
All list endpoints require your API token in the Authorization header.
{
"network": [
{
"id": 1,
"name": "MTN",
"icon": "https://ayglobaldata.com/assets/img/mtn.png",
"plans": [
{ "pId": 101, "name": "MTN 1.0GB SME 7 Days", "price": 390 }
]
}
]
}
Buy Airtime
Top up airtime for any phone number across all networks in Nigeria.
/api/topup/. Also accepts mobile_number and Ported_number as aliases for phone and ported_number, for compatibility with common 3rd-party VTU API formats.$payload = json_encode([ "network" => "1", "phone" => "08012345678", "amount" => 100, "ref" => "AIR_" . time() ]);
{
"status": "success",
"amount_paid": 98.00,
"transaction_ref": "AIR_171000"
}
Buy Data
Purchase SME, Corporate Gifting, or Direct Data instantly.
mobile_number, plan, and Ported_number as aliases for phone, data_plan, and ported_number.$payload = json_encode([ "network" => "1", "phone" => "08012345678", "data_plan" => "10044", "ref" => "DAT_" . time() ]);
{
"status": "success",
"amount_paid": 280.00,
"transaction_ref": "DAT_171000"
}
Verify Electricity Meter
Validate customer details before purchasing electricity token.
GET /ajax/validate_meter_number/?meternumber=&disconame=&mtype=.$payload = json_encode([ "provider" => "1", "meternumber" => "12345678901", "metertype" => "prepaid" ]);
{
"status": "success",
"Customer_Name": "MUSA YUSUF"
}
Pay Electricity Bill
Generate electricity token for verified meters.
/api/billpayment/. Also accepts disco_name, meter_number, and MeterType as aliases for provider, meternumber, and metertype.{
"status": "success",
"plan_description": "Token: 8378-9287...",
"amount_paid": 1000
}
Verify Cable TV (IUC)
GET /ajax/validate_iuc/?smart_card_number=&cablename=.{
"status": "success",
"Customer_Name": "AMINA SULEIMAN"
}
Pay Cable TV
/api/cablesub/. Also accepts smart_card_number, cablename, and cableplan as aliases for iucnumber, provider, and plan.$payload = json_encode([ "provider" => "1", "iucnumber" => "7012345678", "plan" => "128", "ref" => "CAB_" . time() ]);
Generate Exam Pin
{
"status": "success",
"pin": "123456789012",
"amount_paid": 3600.00
}
Send Bulk SMS
Submit via URL-Encoded Form or Form-Data (Uses $_POST variables).
$post = [ 'sender_id' => 'AYGLOBAL', 'phone_numbers' => '0801...,0902...', 'message_body' => 'Welcome!' ];
Verify Identity (NIN/BVN)
Verify a BVN or NIN and retrieve verified customer data.
{
"status": "success",
"data": {
"firstname": "MUSA",
"nin": "12345678901"
}
}
CAC Registration
Submit via multipart/form-data for file uploads.
$post = [ 'type' => 'business_name', 'owner_fullname' => 'John Doe', 'passport' => new CURLFile('/pass.jpg') ];
Transaction History
Fetch your recent transaction history.
{
"status": "success",
"transactions": [
{
"transref": "DAT_171000",
"servicename": "Data",
"amount": 1000.00,
"status": "Success",
"date": "2026-08-01 12:00:00"
}
]
}