Welcome to the Airtime API Integration page. This guide will help you integrate our Airtime API into your system.
curl -X POST https://vtunaija.com.ng/api/topup/ \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "1",
"mobile_number": "08012345678",
"Ported_number": "true",
"request-id": "78977865523",
"amount": "500",
"airtime_type": "VTU"
}'
{
"Status": "successful",
"status": "success",
"api_response": "You have successfully sent Airtime of ₦500 to 08012345678. Your API airtime balance is ₦38,000",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "500"
}
{
"Status": "failed",
"status": "fail",
"api_response": "Failed Failed Failed. Something went wrong",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "0"
}
network: This identifies the specific network for which the user is purchasing airtime. The network post field is represented by the numbers 1, 2, 3, or 4: 1 indicates MTN, 2 indicates GLO, 3 indicates 9Mobile, and 4 indicates Airtel. For the complete list of Vtunaija Network IDs and Plan IDs, check the API Documentation Page 1.
mobile_number: This is the phone number for which the user wants to purchase airtime.
Ported_number: This field is used to bypass the mobile number validator. Setting this field to 'true' means the validator is bypassed, while 'false' means it is not bypassed. This field is optional and defaults to 'true' if not provided during API airtime integration.
request-id: This is the unique ID you send as the Request ID. This field is optional, meaning you may choose not to include it in your airtime API purchase request.
amount: The amount of airtime the user wishes to purchase for the specified phone number.
airtime_type: This specifies the type of airtime the user wants to purchase. The airtime_type must be either "VTU" or "SNS".