Fetch cable TV plans
curl --request GET \
--url https://api.nomba.com/v1/bill/cableTvProduct \
--header 'Authorization: Bearer <token>' \
--header 'accountId: <accountid>'import requests
url = "https://api.nomba.com/v1/bill/cableTvProduct"
headers = {
"accountId": "<accountid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {accountId: '<accountid>', Authorization: 'Bearer <token>'}
};
fetch('https://api.nomba.com/v1/bill/cableTvProduct', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nomba.com/v1/bill/cableTvProduct",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"accountId: <accountid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nomba.com/v1/bill/cableTvProduct"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accountId", "<accountid>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nomba.com/v1/bill/cableTvProduct")
.header("accountId", "<accountid>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomba.com/v1/bill/cableTvProduct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accountId"] = '<accountid>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "00",
"description": "SUCCESS",
"message": "SUCCESS",
"data": [
{
"subScriptionType": "PADI",
"amount": 4400
},
{
"subScriptionType": "YANGA",
"amount": 6000
},
{
"subScriptionType": "CONFAM",
"amount": 11000
},
{
"subScriptionType": "COMPACT",
"amount": 19000
},
{
"subScriptionType": "COMPACT_PLUS",
"amount": 30000
},
{
"subScriptionType": "PREMIUM",
"amount": 44500
}
]
}{
"code": "400",
"description": "Request failed."
}{
"code": "401",
"description": "Unauthorized"
}{
"code": "403",
"description": "Forbidden"
}{
"code": "404",
"description": "Record not found"
}{
"code": "429",
"description": "Too many requests"
}{
"code": "500",
"description": "Server error"
}{
"code": "400",
"description": "Request failed."
}Cable & Bill Payments
Fetch cable TV plans (v1)
deprecated
You can use this endpoint to fetch available cable TV subscription plans for a specific provider (DSTV, GOTV, Startimes, ShowMax)
GET
/
v1
/
bill
/
cableTvProduct
Fetch cable TV plans
curl --request GET \
--url https://api.nomba.com/v1/bill/cableTvProduct \
--header 'Authorization: Bearer <token>' \
--header 'accountId: <accountid>'import requests
url = "https://api.nomba.com/v1/bill/cableTvProduct"
headers = {
"accountId": "<accountid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {accountId: '<accountid>', Authorization: 'Bearer <token>'}
};
fetch('https://api.nomba.com/v1/bill/cableTvProduct', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nomba.com/v1/bill/cableTvProduct",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"accountId: <accountid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nomba.com/v1/bill/cableTvProduct"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accountId", "<accountid>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.nomba.com/v1/bill/cableTvProduct")
.header("accountId", "<accountid>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nomba.com/v1/bill/cableTvProduct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accountId"] = '<accountid>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "00",
"description": "SUCCESS",
"message": "SUCCESS",
"data": [
{
"subScriptionType": "PADI",
"amount": 4400
},
{
"subScriptionType": "YANGA",
"amount": 6000
},
{
"subScriptionType": "CONFAM",
"amount": 11000
},
{
"subScriptionType": "COMPACT",
"amount": 19000
},
{
"subScriptionType": "COMPACT_PLUS",
"amount": 30000
},
{
"subScriptionType": "PREMIUM",
"amount": 44500
}
]
}{
"code": "400",
"description": "Request failed."
}{
"code": "401",
"description": "Unauthorized"
}{
"code": "403",
"description": "Forbidden"
}{
"code": "404",
"description": "Record not found"
}{
"code": "429",
"description": "Too many requests"
}{
"code": "500",
"description": "Server error"
}{
"code": "400",
"description": "Request failed."
}This endpoint is deprecated. Use Fetch cable TV plans (v2) at
GET /v2/bill/cableTvProduct instead. It returns a productId for every plan, which you need to subscribe to plans that share a price.For a complete guide on response codes and transaction statuses, see Response Codes.
Authorizations
Nomba authenticates API calls with OAuth2 HTTP bearer tokens. There are two methods of authentication; Client-Credentials method and PKCE (Proof Key for Code Exchange) method. Both methods return an access token. Send it in the Authorization header: Authorization: Bearer <access_token>.