<?php // Using cURL POST $key="YOUR-ACCOUNT-KEY"; $service_provider="dstv, gotv"; $response = httpPost("https://api.textng.xyz/bp-get-plans-tv/" ,array("key"=>"$key","service_provider"=>"$service_provider")); // using php curlfunction httpPost($url, $data) { $curl =curl_init ($url);curl_setopt ($curl, CURLOPT_POST, true);curl_setopt ($curl, CURLOPT_POSTFIELDS, http_build_query($data));curl_setopt ($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); curl_close($curl);echo $response; } ?>
| Parameters | Example | Description |
|---|---|---|
| Key | XXXXX-XXXX-XXXXX | Your developer API key. This authorizes every request and can be found on your Developer Dashboard. |
| service_provider |
dstv | The service provider you wish to fetch plans for. |
{
"status": true ,
"message": "TV Plans Retrieved" ,
"data": [{"plan_id":"dstv-padi","plan_name":"DStv Padi N4,400","service_provider":"dstv","price":"4400.00"}]
}
{
"status": false ,
"message": "Unable to retrieve plans at this time",
"reason": ""
}