API Documentation
Homepage Get User Balance API Airtime API Data API Fetch Data Plans List Cable TV API Cable TV Verification API Fetch Cable TV Plans List Electricity API Electricity Verification API Fetch Electricty Plan IDs Bulk SMS API Data Pin API Exam Pin API Recharge Card API Internet Bundle API Fetch Internet Bundles List Transaction Query Sandbox Webhook API Sandbox
× Homepage Get User Balance API Sandbox Documentation Airtime API Sandbox Documentation Data API Sandbox Documentation Fetch Data Plans List API Sandbox Documentation Cable TV API Sandbox Documentation Cable TV Verification API Sandbox DocumentationI Fetch Cable TV Plans List API Sandbox Documentation Electricity API Sandbox Documentation Electricity Verification API Sandbox Documentation Fetch Electricty Plan IDs API Sandbox Documentation Bulk SMS API Sandbox Documentation Data Pin API Sandbox Documentation Exam Pin API Sandbox Documentation Recharge Card API Sandbox Documentation Internet Bundle API Sandbox Documentation Fetch Internet Bundles List API Sandbox Documentation Transaction Query API Sandbox Documentation Webhook API Sandbox Documentation

Airtime API Integration

(Sandbox Environment) Register and Login on the Sandbox Website to get your Sandbox API Key for the Sandbox Integration Click Here

Welcome to the Airtime API Sandbox Integration page. This guide will help you integrate our Sandbox Airtime API into your system.

On Sandbox environment the mobile number you are purchasing airtime for must be 08011111111 any other mobile number that is not 08011111111 the airtime purchase request will fail.

cURL Init Sample

curl -X POST https://sandbox.vtunaija.com.ng/api/topup/ \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"network": "1",
"mobile_number": "08011111111",
"Ported_number": "true",
"request-id": "78977865523",
"amount": "500",
"airtime_type": "VTU"
}'

Successful API Response

{
"Status": "successful",
"status": "success",
"api_response": "You have successfully sent Airtime of ₦500 to 08011111111",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "500.00",
"transaction_internal_id": "204781"
}

Failed API Response

{
"Status": "failed",
"status": "fail",
"api_response": "Failed Failed Failed. Something went wrong",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "0.00",
"transaction_internal_id": "204781"
}

Processing API Response

{
"Status": "processing",
"status": "processing",
"api_response": "Pending Airtime Topup of ₦500",
"id": "78977865523",
"ident": "78977865523",
"plan_amount": "0.00"
"transaction_internal_id": "204781"
}

Failed API Response

This is an example of a failed API response caused by factors such as an insufficient wallet balance, an incorrect API key, missing POST fields and so on.

{
"Status": "failed",
"status": "fail",
"message": "Insufficient wallet balance",
}

Post Terms Defined and Interpreted

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 Sandbox 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. On Sandbox environment the mobile number must be 08011111111 any other mobile number that is not 08011111111 the airtime purchase request will fail.

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.

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".