Cable TV API
Integrate DStv, GOtv, and StarTimes subscription renewals into your application.
Get Cable Providers & Plans
Retrieve the list of supported cable TV providers and their available subscription plans.
GET
https://suruleredatacom.com.ng/api/get-cable-providers?cable=Gotv
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| cable | String | Required | Must be exactly cable. |
curl -X GET "https://suruleredatacom.com.ng/api/get-cable-providers?cable=Gotv" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json"
<?php
$url = 'https://suruleredatacom.com.ng/api/get-cable-providers?cable=Gotv';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Token YOUR_API_KEY',
'Content-Type: application/json',
]
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
const response = await fetch('https://suruleredatacom.com.ng/api/get-cable-providers?cable=Gotv', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://suruleredatacom.com.ng/api/get-cable-providers?cable=Gotv"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
Response
✓ 200 OK
{
[
{ "id": "1", "name": "GOtv Max", "price": "8500" },
{ "id": "2", "name": "GOtv Jolli", "price": "5800" },
{ "id": "3", "name": "GOtv Jinja", "price": "3900" },
{ "id": "4", "name": "GOtv Smallie", "price": "1900" }
]
}
Verify Smartcard
Always verify the customer's smartcard or IUC number before attempting a purchase.
POST
https://suruleredatacom.com.ng/api/cable/cable-validation
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| cable | Integer | Yes | Provider ID from /get-cable-providers. |
| iuc | String | Yes | The customer's smartcard/IUC number. |
✓ 200 OK
{
"status": "success",
"name": "IBRAHIM MUSA",
"customer_address": "NO 5 Amule, Ilorin Kwara state",
"message": "verified, kindly check the name."
}
Purchase Subscription
Process the payment and renew the customer's cable TV subscription.
POST
https://suruleredatacom.com.ng/api/cable
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| cable | Integer | Yes | Provider ID. |
| iuc | String | Yes | Verified smartcard or IUC number. |
| cable_plan | String | Yes | Plan code (e.g., dstv-padi). |
| request-id | String | Optional | Idempotency key. |
curl -X POST "https://suruleredatacom.com.ng/api/cable" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cable": 1,
"iuc": "1234567890",
"cable_plan": "dstv-padi",
"request-id": "cab_123"
}'
<?php
$url = 'https://suruleredatacom.com.ng/api/cable';
$payload = [
'provider_id' => 1,
'customer_id' => '1234567890',
'plan' => 'dstv-padi',
'request-id' => 'API_' . uniqid()
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => [
'Authorization: Token YOUR_API_KEY',
'Content-Type: application/json',
]
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
const response = await fetch('https://suruleredatacom.com.ng/api/cable', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
provider_id: 1,
customer_id: '1234567890',
plan: 'dstv-padi',
'request-id': 'cab_123'
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://suruleredatacom.com.ng/api/cable"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"provider_id": 1,
"customer_id": "1234567890",
"plan": "dstv-padi",
"request-id": "cab_123"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Responses
✓ 200 OK
{
"status": "success",
"Status": "successful",
"message": "Cable Subscription Successful.",
"response": "DSTV DStv Padi Subscription Successful for 1234567890",
"api_response": "DSTV DStv Padi Subscription Successful for 1234567890",
"request-id": "API_66bbd45c67b7b",
"service": "cable",
"amount": "2950",
"old_balance": 5000,
"new_balance": 2050
}