BILLS PAYMENT
Get Cable Plans
List the available packages for a cable TV provider, so you can pick a package_id to purchase.
GET /v1/bills/cable-plans
Use this endpoint to
- List all cable packages available for a provider
- Get the
package_idand price to show a customer before they buy - Confirm the exact amount that will be charged for a package
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
provider |
string | Yes | A cable biller slug from Get Billers (e.g. DSTV) |
Code Samples
const response = await fetch(
"https://sandbox.hitchpay.ng/v1/bills/cable-plans?provider=DSTV",
{
method: "GET",
headers: {
Authorization: "Bearer YOUR_ACCESS_TOKEN"
}
}
);
const data = await response.json();
console.log(data);<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://sandbox.hitchpay.ng/v1/bills/cable-plans?provider=DSTV",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN"
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;import requests
url = "https://sandbox.hitchpay.ng/v1/bills/cable-plans"
params = {"provider": "DSTV"}
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
response = requests.get(url, params=params, headers=headers)
print(response.json())Response
{
"status": "success",
"message": "Cable plans retrieved",
"data": [
{
"package_id": "98765",
"biller_id": "…",
"name": "DStv Compact",
"slug": "dstv-compact",
"amount": 19000
}
]
}Fields
| Field | Type | Description |
|---|---|---|
package_id |
string | Pass this in the package_id field of Pay Cable TV |
biller_id |
string | Internal biller identifier |
name |
string | Package name (e.g. "DStv Compact") |
slug |
string | Package slug |
amount |
number | Price in NGN — this is what will actually be charged |
Note: The amount shown here is the amount that will be charged when you purchase this plan. The purchase endpoint does not accept a client-supplied amount for cable — it always uses the package's price.
Errors
| Code | Meaning |
|---|---|
INVALID_REQUEST |
provider missing or not a recognized slug |
UNAUTHORIZED |
Business not found or inactive |
PRODUCT_UNAVAILABLE |
No cable plans configured for this provider |
Questions? Email [email protected]. Also on GitBook.