Validate a cable account
Verify a smart card number. Request fields, response examples and integration guidance.
/customer-validation/cable-tv
Example request
curl --request POST \
--url "https://api.strongmb.ng/v1/customer-validation/cable-tv" \
--header "Authorization: Bearer $STRONGMB_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"smart_card_number": "0123456789",
"product_code": "smb_dst_bou_a9c82"
}'
// Server-side Node.js 22+; never expose your key in a browser.
async function main() {
const response = await fetch("https://api.strongmb.ng/v1/customer-validation/cable-tv", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.STRONGMB_API_KEY}`,
Accept: "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
"smart_card_number": "0123456789",
"product_code": "smb_dst_bou_a9c82"
}),
signal: AbortSignal.timeout(30000)
});
const result = await response.json();
console.log(response.status, result);
}
main().catch(console.error);
<?php
// Requires the PHP cURL extension.
$client = curl_init('https://api.strongmb.ng/v1/customer-validation/cable-tv');
curl_setopt_array($client, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('STRONGMB_API_KEY'),
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => '{
"smart_card_number": "0123456789",
"product_code": "smb_dst_bou_a9c82"
}',
]);
$raw = curl_exec($client);
if ($raw === false) {
throw new RuntimeException(curl_error($client));
}
$status = curl_getinfo($client, CURLINFO_HTTP_CODE);
curl_close($client);
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
print_r(['http_status' => $status, 'response' => $result]);
require 'net/http'
require 'json'
uri = URI('https://api.strongmb.ng/v1/customer-validation/cable-tv')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
http.open_timeout = 10
http.read_timeout = 30
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer ' + ENV.fetch('STRONGMB_API_KEY')
request['Accept'] = 'application/json'
request['Content-Type'] = 'application/json'
request.body = '{
"smart_card_number": "0123456789",
"product_code": "smb_dst_bou_a9c82"
}'
begin
response = http.request(request)
result = JSON.parse(response.body)
puts({ http_status: response.code, response: result }.to_json)
rescue StandardError => error
warn error.message
end
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
headers = {
"Authorization": "Bearer " + os.environ["STRONGMB_API_KEY"],
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {'smart_card_number': '0123456789',
'product_code': 'smb_dst_bou_a9c82'}
body = json.dumps(payload).encode("utf-8")
request = Request(
"https://api.strongmb.ng/v1/customer-validation/cable-tv",
data=body, headers=headers, method="POST"
)
try:
with urlopen(request, timeout=30) as response:
result = json.load(response)
print(response.status, result)
except HTTPError as error:
print(error.code, error.read().decode("utf-8"))
except URLError as error:
print("Network error:", error.reason)
Verifies that a smart card number belongs to a valid account. On success, returns the account details and a
verify_token that is required in the purchase request.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| smart_card_number | string | Required | The customer's smart card number (10–15 digits) |
| product_code | string | Required | Product code from /products/cable-tv — identifies the provider |
Request Example
{
"smart_card_number": "0123456789",
"product_code": "smb_dst_bou_a9c82"
}
{
"status": true,
"message": "Smart card number verified successfully.",
"data": {
"details": {
"smart_card_number": "0123456789",
"customer_name": "Strongmb User",
"provider": "dstv",
"renewal_amount": "5800",
"due_date": "2026-08-10T00:00:00",
"current_bouquet": ""
},
"verify_token": "cFRDbDk2WmZXamVPTm1vdy9RSnBiQzVxczJUR08zL1hLZWdmZm9YZStvOD0="
},
"metadata": { "code": "CABLE_TV_ACCOUNT_VERIFIED", "timestamp": 1786313276, "trace_id": "3DC1C5CD55" }
}
{
"status": false,
"message": "Invalid smart card number or the account is inactive.",
"data": null,
"metadata": { "code": "ERR_INVALID_CABLE_TV_ACCOUNT", "timestamp": 1786313342, "trace_id": "733C6EFE05" }
}
{
"status": false,
"message": "The selected provider is invalid or unsupported.",
"data": null,
"metadata": { "code": "ERR_INVALID_CABLE_TV_PROVIDER", "timestamp": 1786313350, "trace_id": "8A1D2E3F4B" }
}
Response Codes
| Code | HTTP | Meaning |
|---|---|---|
| CABLE_TV_ACCOUNT_VERIFIED | 200 | Smart card is valid. Save the verify_token — it is required in the purchase request. |
| ERR_INVALID_CABLE_TV_ACCOUNT | 400 | Smart card number is not found or the account is inactive. |
| ERR_INVALID_CABLE_TV_PROVIDER | 400 | The product_code maps to a provider that is not supported. |
Understand the request fields
| Field | Integration guidance |
|---|---|
smart_card_number
|
The customer or smart-card number. Confirm the returned customer identity before purchase. |
product_code
|
An exact identifier from the matching product list, not a provider name or an identifier from a different API. |
Response fields and types
Expand an object to explore its fields. [] indicates an array item. Error responses may return
data: null.
| Field path | JSON type | Meaning and handling |
|---|---|---|
status |
boolean | Whether this API request succeeded. Check the HTTP status and metadata.code when handling errors. |
message |
string | Human-readable description of the result. Use metadata.code for programmatic error handling instead of parsing this text. |
data |
null | object | Response data. Check the result before reading nested fields; an error may return null or validation details. |
data.details |
object | Transaction details for the purchased service. Fields vary by service. |
data.details.smart_card_number |
string | Cable TV smart-card identifier that was validated. Preserve it as a string. |
data.details.customer_name |
string | Customer name returned by validation. Show it to the user for confirmation before purchasing. |
data.details.provider |
string | Provider identifier associated with the purchased service. |
data.details.renewal_amount |
string | Renewal amount returned by the cable provider. Use it with the selected product and current pricing. |
data.details.due_date |
string | Due-date value returned by the provider. Its display format is provider-dependent. |
data.details.current_bouquet |
string | Current cable TV bouquet or package reported during customer validation. |
data.verify_token |
string | Opaque token returned by validation. Send it unchanged for the same customer and product when purchasing; do not display it publicly. |
metadata |
object | Diagnostic information about the response. |
metadata.code |
string | Machine-readable result code. Use it to distinguish validation, authentication and service errors. |
metadata.timestamp |
integer | Unix timestamp in seconds associated with the response. |
metadata.trace_id |
string | Correlation identifier for troubleshooting. Retain it with a redacted request when contacting support. |
Customer names, phone numbers, meter and smart-card numbers in these examples are fictional placeholders. Replace them with valid customer details for real requests.
Always check metadata.code; do not rely on HTTP status alone. See response codes and recommended
handling.
Test your integration Use the sandbox test values and examples.
Questions? Let’s work through them.
Having an issue or need help with your integration? Join the Strongmb Slack community to ask questions and get assistance from our team and other developers.
Keep API keys and customer details private when sharing examples.
Experiencing a service issue? Check Strongmb’s service status for incident updates.
Did this page help you?
Up to 100 characters. Please leave out personal details, account information and API keys.