Purchase Cable TV
curl --request POST \
--url https://api.bleeprs.com/api/purchaseCableTV \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 15700,
"smartcard": "8093245829",
"phone": "08000000000",
"provider": "DSTV",
"bouquetCode": "DSTV_PACKAGE_CODE"
}
'import requests
url = "https://api.bleeprs.com/api/purchaseCableTV"
payload = {
"amount": 15700,
"smartcard": "8093245829",
"phone": "08000000000",
"provider": "DSTV",
"bouquetCode": "DSTV_PACKAGE_CODE"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 15700,
smartcard: '8093245829',
phone: '08000000000',
provider: 'DSTV',
bouquetCode: 'DSTV_PACKAGE_CODE'
})
};
fetch('https://api.bleeprs.com/api/purchaseCableTV', 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.bleeprs.com/api/purchaseCableTV",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 15700,
'smartcard' => '8093245829',
'phone' => '08000000000',
'provider' => 'DSTV',
'bouquetCode' => 'DSTV_PACKAGE_CODE'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bleeprs.com/api/purchaseCableTV"
payload := strings.NewReader("{\n \"amount\": 15700,\n \"smartcard\": \"8093245829\",\n \"phone\": \"08000000000\",\n \"provider\": \"DSTV\",\n \"bouquetCode\": \"DSTV_PACKAGE_CODE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bleeprs.com/api/purchaseCableTV")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 15700,\n \"smartcard\": \"8093245829\",\n \"phone\": \"08000000000\",\n \"provider\": \"DSTV\",\n \"bouquetCode\": \"DSTV_PACKAGE_CODE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bleeprs.com/api/purchaseCableTV")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 15700,\n \"smartcard\": \"8093245829\",\n \"phone\": \"08000000000\",\n \"provider\": \"DSTV\",\n \"bouquetCode\": \"DSTV_PACKAGE_CODE\"\n}"
response = http.request(request)
puts response.read_body{
"gatewayStatus": "00",
"gatewayMessage": "Successfully Processed",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {
"smartcard": "8093245829",
"provider": "DSTV",
"bouquet": "DSTV Compact",
"amount": 15700,
"commission": 150
}
}{
"gatewayStatus": "01",
"gatewayMessage": "Transaction Pending",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {}
}{
"gatewayStatus": "88",
"gatewayMessage": "Unsucessfull",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": "No active NGN vending account found"
}Vending
Purchase Cable TV
Purchase a subscription for Cable TV
POST
/
purchaseCableTV
Purchase Cable TV
curl --request POST \
--url https://api.bleeprs.com/api/purchaseCableTV \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 15700,
"smartcard": "8093245829",
"phone": "08000000000",
"provider": "DSTV",
"bouquetCode": "DSTV_PACKAGE_CODE"
}
'import requests
url = "https://api.bleeprs.com/api/purchaseCableTV"
payload = {
"amount": 15700,
"smartcard": "8093245829",
"phone": "08000000000",
"provider": "DSTV",
"bouquetCode": "DSTV_PACKAGE_CODE"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 15700,
smartcard: '8093245829',
phone: '08000000000',
provider: 'DSTV',
bouquetCode: 'DSTV_PACKAGE_CODE'
})
};
fetch('https://api.bleeprs.com/api/purchaseCableTV', 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.bleeprs.com/api/purchaseCableTV",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 15700,
'smartcard' => '8093245829',
'phone' => '08000000000',
'provider' => 'DSTV',
'bouquetCode' => 'DSTV_PACKAGE_CODE'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bleeprs.com/api/purchaseCableTV"
payload := strings.NewReader("{\n \"amount\": 15700,\n \"smartcard\": \"8093245829\",\n \"phone\": \"08000000000\",\n \"provider\": \"DSTV\",\n \"bouquetCode\": \"DSTV_PACKAGE_CODE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bleeprs.com/api/purchaseCableTV")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 15700,\n \"smartcard\": \"8093245829\",\n \"phone\": \"08000000000\",\n \"provider\": \"DSTV\",\n \"bouquetCode\": \"DSTV_PACKAGE_CODE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bleeprs.com/api/purchaseCableTV")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 15700,\n \"smartcard\": \"8093245829\",\n \"phone\": \"08000000000\",\n \"provider\": \"DSTV\",\n \"bouquetCode\": \"DSTV_PACKAGE_CODE\"\n}"
response = http.request(request)
puts response.read_body{
"gatewayStatus": "00",
"gatewayMessage": "Successfully Processed",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {
"smartcard": "8093245829",
"provider": "DSTV",
"bouquet": "DSTV Compact",
"amount": 15700,
"commission": 150
}
}{
"gatewayStatus": "01",
"gatewayMessage": "Transaction Pending",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": {}
}{
"gatewayStatus": "88",
"gatewayMessage": "Unsucessfull",
"requestReference": "bpr_req_a1b2c3d4e5f6",
"data": "No active NGN vending account found"
}Overview
Purchase a subscription package for a validated Cable TV smartcard. The subscription will be activated instantly.Request Body
Response Fields
string
Reference to store for reconciliation, support, and requerying pending transactions.
string
Smartcard number for the completed purchase.
string
Cable TV provider for the completed purchase.
string
Purchased package name, when available.
number
Package amount, in Naira.
number
Commission earned on the purchase, in Naira.
Status Codes
| Code | Meaning |
|---|---|
200 | Subscription completed successfully. Package details are returned in data. |
202 | Subscription accepted but not yet confirmed. Wait at least 2 minutes, then call Requery Transaction to confirm the final status. |
400 | The request could not be processed. Common causes: invalid payload, insufficient balance, or the purchase was declined by the provider. If the wallet was debited, it is automatically refunded. |
Notes
- Validate the smartcard before purchase and let the customer confirm the returned details.
- Use the
productCodefrom the cable TV catalog asbouquetCode. - Use the package amount returned by the catalog.
- If the API returns
gatewayStatus: "01"or an accepted pending response, wait at least 2 minutes before calling Requery Transaction.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Package amount returned by the CableTVList endpoint
Example:
15700
The validated customer smartcard or IUC number
Example:
"8093245829"
The customer phone number
Example:
"08000000000"
The Cable TV provider
Example:
"DSTV"
Product code returned by the CableTVList endpoint
Example:
"DSTV_PACKAGE_CODE"
Was this page helpful?