Recharge Card Printing API Integration
Recharge Card API Integration
This section contains your RESTful API for Recharge Card Printing API integration.
Recharge Card Printing API Integration
Recharge Card API Integration
This section contains your RESTful API for Recharge Card Printing 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/airtime-pin/
Sandbox: https://vtuafrica.com.ng/portal/api-test/airtime-pin/
Parameters: as specified in the parameters below:
PARAMETERS | Required/Optional | TYPE | DESCRIPTION |
apikey | R | String | The reseller gateway API key created at vtuafrica.com.ng. |
network | R | String | The Network provider as specified. These includes, mtn, airtel, glo, 9mobile |
quantity | R | Number | The quantity of Recharge card Pins you want to generate. |
variation | R | String | The variation Code of the amount of the recharge Card such as seeb below. |
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 and Recharge Card PIN to it. If not provided, the webhook in your profile will be used. |
SAMPLE CODE
$sandbox = "https://vtuafrica.com.ng/portal/api-test/airtime-pin?apikey=1234&network=mtn&amount=100&quantity=1&ref=8284666332234"; $host = "https://vtuafrica.com.ng/portal/api/airtime-pin?apikey=1234&network=mtn&variation=1&quantity=1&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); $data = curl_exec($ch); //Close the cURL handle. curl_close($ch); $response = json_decode($data);
EXPECTED RESPONSE
{"code":101, "description":{"Status":"Completed","ProductName":"MTN Airtime PIN","Quantity":"1", "pins":"1655454467665","Request_Amount":"100","Amount_Charged":"98","Previous_Balance":"100", "Current_Balance":"2","ReferenceID":"828466633","message":"Recharge Successful" }}
Amount | variation Code | |
N100 | 1 | |
N200 | 2 |