Cable Subscription Endpoint
Purchase cable TV subscriptions.
Endpoint
URL: /api/cableapi
Methods: POST, GET
Description
This API endpoint allows users to purchase cable TV subscriptions.
Authentication
To access this endpoint, users must include their API key and secret key in the request headers.
Request Headers
- api-key (string, required): The API key of the user.
- secret-key (string, required): The secret key of the user.
Request Body (POST)
- phone (string, required): The phone number of the recipient.
- number (string, required): The smart card number to subscribe on.
- firstLevel (string, required): The name of the subscription.
- secondLevel (string, required): The subscription package.
- requestId (string, optional): The unique request identifier which you can use to query processed transaction. 5-50 characters long.
Usage Example
POST request to purchase TV subscription:
Content-Type: application/json
api-key: your-api-key
secret-key: your-secret-key
{
"phone": "08032566178",
"number": "0000000000",
"firstLevel": "DSTV", // value of this key can either be firstLevel or fId, e.g. "dstv" fId is more accurate
"secondLevel": "dstv padi", // value of this key can either be secondLevel or sId, e.g. "dstv-padi" sId is more accurate
"requestId": "yourreference"
}Response:
{
"message": "Transaction successful",
"data": {
"transactionId": "1234567890",
"email": "user@example.com",
"activity": "DSTV",
"message": "dstv padi",
"status": "Successful",
"recipient": "0000000000",
"amount": 2950,
"initialBalance": 3000,
"finalBalance": 50,
"Method": API,
}
}Failed Response Format
{
"message": "Transaction failed",
"data": {
"transactionId": "0000000000",
"email": "user@example.com",
"activity": "DSTV",
"message": "dstv padi",
"status": "Failed",
"recipient": "0000000000",
"amount": 2950,
"initialBalance": 3000,
"finalBalance": 3000
"Method": API,
}
}GET Request
Get the list of available firstLevel and secondLevel:
Content-Type: application/json api-key: your-api-key secret-key: your-secret-key
Response:
[
{
"available": true,
"firstLevel": "DSTV",
"fId": "dstv",
"amounts": [null],
"secondLevels": [
{
"available": true,
"secondLevel": "DStv Padi",
"sId": "dstv-padi",
"amounts": [4400]
},
{
"available": true,
"secondLevel": "DStv-Yanga",
"sId": "dstv-yanga",
"amounts": [6600]
},
{
"available": true,
"secondLevel": "Dstv Confam",
"sId": "dstv-confam",
"amounts": [11000]
},
{
"available": true,
"secondLevel": "Dstv Compat",
"sId": "dstv-compat",
"amounts": [19000]
},
{
"available": true,
"secondLevel": "Dstv French Touch Add-on",
"sId": "dstv-french-touch-add-on",
"amounts": [7000]
},
{
"available": true,
"secondLevel": "ExtraView Access",
"sId": "extraview-access",
"amounts": [6000]
},
{
"available": true,
"secondLevel": "Dstv Yanga+Showmax",
"sId": "dstv-yangashowmax",
"amounts": [7750]
},
{
"available": true,
"secondLevel": "Dstv Great Wall Standalone Bouque+showmax",
"sId": "dstv-great-wall-standalone-bouqueshowmax",
"amounts": [7300]
},
{
"available": true,
"secondLevel": "Dstv FTA Plus",
"sId": "dstv-fta-plus",
"amounts": [1600]
},
{
"available": true,
"secondLevel": "DStv Access",
"sId": "dstv-access",
"amounts": [2000]
},
{
"available": true,
"secondLevel": "Dstv Family",
"sId": "dstv-family",
"amounts": [4000]
},
{
"available": true,
"secondLevel": "DSTV MOBILE",
"sId": "dstv-mobile",
"amounts": [790]
},
{
"available": true,
"secondLevel": "Dstv Movie Bundle Add-on",
"sId": "dstv-movie-bundle-add-on",
"amounts": [3500]
},
{
"available": true,
"secondLevel": "DStv PVR Access Service",
"sId": "dstv-pvr-access-service",
"amounts": [4000]
}
]
},
{
"available": true,
"firstLevel": "GOTV",
"fId": "gotv",
"amounts": [0],
"secondLevels": [
{
"available": true,
"secondLevel": "GOtv Max",
"sId": "gotv-max",
"amounts": [8500]
},
{
"available": true,
"secondLevel": "Gotv Jolli",
"sId": "gotv-jolli",
"amounts": [5800]
},
{
"available": true,
"secondLevel": "Gotv Jinja",
"sId": "gotv-jinja",
"amounts": [3900]
},
{
"available": true,
"secondLevel": "Gotv Smallie-monthly",
"sId": "gotv-smallie-monthly",
"amounts": [1900]
},
{
"available": true,
"secondLevel": "Gotv Smallie-quarterly",
"sId": "gotv-smallie-quarterly",
"amounts": [5100]
},
{
"available": true,
"secondLevel": "Gotv Smallie-yearly",
"sId": "gotv-smallie-yearly",
"amounts": [15000]
},
{
"available": true,
"secondLevel": "Gotv Supa-monthly",
"sId": "gotv-supa-monthly",
"amounts": [11400]
},
{
"available": true,
"secondLevel": "Gotv Supa Plus-monthly",
"sId": "gotv-supa-plus-monthly",
"amounts": [16800]
}
]
},
{
"available": true,
"firstLevel": "SHOWMAX",
"fId": "showmax",
"amounts": [0],
"secondLevels": [
{
"available": true,
"secondLevel": "Full",
"sId": "full",
"amounts": [4500]
},
{
"available": true,
"secondLevel": "Mobile Only - N2,000",
"sId": "mobile-only-n2000",
"amounts": [2000]
},
{
"available": true,
"secondLevel": "Full Sports Mobile Only - N6,500",
"sId": "full-sports-mobile-only-n6500",
"amounts": [6500]
},
{
"available": true,
"secondLevel": "Sports Mobile Only - N4,500",
"sId": "sports-mobile-only-n4500",
"amounts": [4500]
},
{
"available": true,
"secondLevel": "Full - N9,000 - 3 Months",
"sId": "full-n9000-3-months",
"amounts": [9000]
},
{
"available": true,
"secondLevel": "Mobile Only - N4,000 - 3 Months",
"sId": "mobile-only-n4000-3-months",
"amounts": [4000]
},
{
"available": true,
"secondLevel": "Sports Mobile Only - N13,500 - 3 Months",
"sId": "sports-mobile-only-n13500-3-months",
"amounts": [13500]
},
{
"available": true,
"secondLevel": "Sports Only - N3,600",
"sId": "sports-only-n3600",
"amounts": [3600]
},
{
"available": true,
"secondLevel": "Sports Only 3 months - N7,200",
"sId": "sports-only-3-months-n7200",
"amounts": [7200]
}
]
}
]