VTU AFRICAVTUAfrica.com.ng

  • MAIN NAVIGATION
  • Introduction
  • Discounts & Prices
  • Balance Check
  • Airtime
    • Airtime VTU
    • Airtime Share
  • Data Bundle
    • Data (All Networks)
    • Smile Data
  • Cable TV Subcription
    • Cable TV Verification
    • Cable TV Subscription
  • Electricity bills
    • Meter Verification
    • Electricity Bills
  • Examination PINS
  • Bank Transfer
    • Verify Account Number
    • Send Money
  • Recharge Card PINS
  • Bet Wallet funding
  • Airtime2Cash Conversion
  • Bulk SMS
  • Transaction Status
    • Transaction Query
    • Resend Webhook
  • How To Videos
  • Back To Home Page
  • Home SOFTWARE RESELLER
  • My Account

    • Login
    • Register

Airtime To Cash conversion API Integration

Airtime To Cash conversion API Integration

This section contains your RESTful API for Airtime To Cash conversion API integration.

 

Authentication

The VTU Africa API uses API Key for Authentication.

Please use your APIKEY for authentication



Just like the Cable TV, this service requires you to first verify if the Airtime2cash service is available or not before you can proceed.
And if the service is available, you will get a response with "Status":"Completed" and a phone number to transfer your airtime to.
If the service is not available, a failed Status will be given and you are not to proceed in this case.


Verify if Service is available.

Airtime to cash service can be Validated or Verified with the endpoint below:

Base URL: https://vtuafrica.com.ng/portal/api/merchant-verify/

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
serviceName R String This is the Name of the service you are verifiying.
In this case it is: Airtime2Cash
network R String The Network of the airtime you want to convert.
These includes: mtn, airtel, glo, 9mobile

 

SAMPLE CODE


$host ="https://vtuafrica.com.ng/portal/api/merchant-verify/?apikey=1234&serviceName=Airtime2Cash&network=mtn";
//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","Phone_Number":"08124139638","Network":"MTN",
"message":"MTN Airtime To Cash Service Is Available. Kindly Transfer The Exact Amount To Convert into Our Phone Number: 08124139638"
} }






Convert Airtime To Cash

Airtime To Cash conversion services can be perfomed with the endpoint below:


Live URL: https://vtuafrica.com.ng/portal/api/airtime-cash/


Sandbox: https://vtuafrica.com.ng/portal/api-test/airtime-cash/


Parameters: as specified in the parameters below:

 

NOTE: After verification, you are to first Transfer the airtime to the phone number given before proceeding.
If you send multiple requests without sending the airtime, your account will be Blocked by our system automatically.

 

PARAMETERS Required/Optional TYPE DESCRIPTION
apikey R String The USER API key created at https://vtuafrica.com.ng.
network R String The Network you are converting.
These include: mtn, airtel, glo and 9mobile
sender R String The email address of the user in your website or any other Unique identifier which you can use to identify and fund the user in your website upon completion.
sendernumber R Number The phone number where the Airtime was transferred from. That is, the user phone number.
amount R Number The amount you wish to Convert, which you have already sent to the phone number given during the service verification.
ref R String This is a unique reference with which you can use to execute and query the transaction.
sitephone O Number This is our phone number which was given to you during the service verification. That is, the phone number where you transferred the airtime to.
webhookURL O URL This is a webhook URL for notification of the final status of the airtime Convertion.
If not provided, the webhook in your profile will be used. Please include http:// or https://

 

SAMPLE CODE

$sandbox = "https://vtuafrica.com.ng/portal/api-test/airtime-cash/?apikey=1234&network=mtn&sender=test@gmail.com&sendernumber=08012345678&amount=1000&sitephone=08124139638&ref=882234&webhookURL=http://testlink.com/webhook/"; 

$host = "https://vtuafrica.com.ng/portal/api/airtime-cash/?apikey=1234&network=mtn&sender=test@gmail.com&sendernumber=08012345678&amount=1000&sitephone=08124139638&ref=882234&webhookURL=http://testlink.com/webhook/";




//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);

$result = json_decode($data);

 

EXPECTED RESPONSE

{"code":101, 
"description":{"Status":"Processing","Service":"Airtime2Cash",
"senderNumber":"08012345678","Network":"MTN","AmountTransferred":"1000",
"Charge":"20","Charge":"30","AmountPaid":"980","Current_Balance":"470",
"ReferenceID":"884666332234","message":"Airtime Converssion Request Received Successfully. Your Account will be Credited immediately your Airtime is received. Thank YOU" 
}} 

 

WEBHOOK PAYLOAD

{"ref":"884666332234","status":"Completed",
"service":"Airtime2Cash","network":"mtn","amount":"1000",
"credit":"980","Charge":"20","Previous_Balance":"0",
"Current_Balance":"980","sender":"test@gmail.com","message":"Airtime2Cash Converted Succesfully" }} 

 

EXPECTED WEBHOOK RESPONSE

For your account on VTU Africa to be Succesfully funded, you will have to supplied a valid webhook response such as "code":"101" or "status":"Completed"
  {"code":101,"status":"Completed","message":"Write your response or status" }} 

OTHER SERVICES


CopyRight © 2016 - VTUAfrica.com.ng. All Rights Reserved
Site Designed by: EMMALEX ICT SOLUTIONS | Powered by RESELLER HOSTING