Airtime Share API Integration
Airtime Share API Integration
This section contains your RESTful API for Airtime Share API integration.
Airtime Share API Integration
Airtime Share API Integration
This section contains your RESTful API for Airtime Share API integration.
The VTU Africa API uses API Key for Authentication.
Please use your APIKEY for authentication
Live URL: https://vtuafrica.com.ng/portal/api/airtimeshare/
Sandbox: https://vtuafrica.com.ng/portal/api-test/airtimeshare/
Parameters: as specified in the parameters below:
| PARAMETERS | Required/Optional | TYPE | DESCRIPTION |
| apikey | R | String | The USER API key created at https://vtuafrica.com.ng. |
| network | R | String | Network as specified. These includes, mtn, airtel, glo, 9mobile |
| phone | R | Number | The phone number to receive the airtime |
| amount | R | Number | The amount you wish to recharge |
| ref | R | String | This is a unique reference with which you can use to execute and query the transaction. |
| webhookURL | O | String | Your webhook URL. We send transaction status to it. If not provided, the webhook in your profile will be used. |
SAMPLE CODE
$sandbox = "https://vtuafrica.com.ng/portal/api-test/airtimeshare/?apikey=1234&network=mtn&phone=0803992222&amount=100&ref=8284666332234";
$host = "https://vtuafrica.com.ng/portal/api/airtimeshare/?apikey=1234&network=mtn&phone=0803992222&amount=100&ref=8284666332234";
//Initialize cURL.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
// Set custom headers (OPTIONAL)
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Accept: application/json, text/plain, */*'
]);
// Set the User-Agent
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36');
$data = curl_exec($ch);
//Close the cURL handle.
curl_close($ch);
$result = json_decode($data);
EXPECTED RESPONSE
{"code":101,
"description":{"Status":"Completed",
"ProductName"=>"MTN Airtime Share",
"amount":"100","Amount_Charged"=>"95",
"Previous_Balance"=>"1000","Current_Balance"=>"905",
"MobileNumber"=>"0803992222","ReferenceID"=>"884666332234",
"message"=>"Recharge Successful"
"transaction_date":"22 October 2026, 10:45 PM"}}