API Reference
Welcome to the Data Subs 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.
{
"status": "success",
"userid": "123",
"name": "John Doe",
"balance": "5000.00"
}
Buy Airtime
Top up airtime for any phone number across all networks in Nigeria.
$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.
$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.
$payload = json_encode([ "provider" => "1", "meternumber" => "12345678901", "metertype" => "prepaid" ]);
{
"status": "success",
"Customer_Name": "MUSA YUSUF"
}
Pay Electricity Bill
Generate electricity token for verified meters.
{
"status": "success",
"plan_description": "Token: 8378-9287...",
"amount_paid": 1000
}
Verify Cable TV (IUC)
{
"status": "success",
"Customer_Name": "AMINA SULEIMAN"
}
Pay Cable TV
$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' => 'DATA', 'phone_numbers' => '0801...,0902...', 'message_body' => 'Welcome!' ];
Verify Identity (NIN/BVN)
{
"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') ];