Pay TV Customer Details
THis is method is used to query for Pay TV Customer Details
Request Type
GET
General Payload
// Sample PHP pay Load
$live_url = "https://silicon-pay.com/get_pay_tv_customer_details";
$test_url = "https://silicon-pay.com/test/get_pay_tv_customer_details";
$data_req = [
"encryption_key"=>"XXXXXXXXXXX",
"payment_code"=>"Package Payment Code got from query Pay TV tariffs",
"smart_card_number"=>"Customer Reference/ Account Number/ Meter Number"
];
$curl = curl_init();
curl_setopt_array($curl, array(
//Use live url ($live_url) when in production.
CURLOPT_URL => $test_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>json_encode($data_req),
CURLOPT_HTTPHEADER =>array(),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Parameter Description
# | Parameter | Description |
---|---|---|
1 | payment_code | Package Payment Code got from query Pay TV tariffs" |
1 | smart_card_number | This is the customer number/ Account Number/ Smart Card number of the customer |
Success Response
When all the payload parameters are correct, You shall a json Response with the customer details
{
"status": 200,
"message": "success",
"request_reference": "XXXXXXX",
"customer_name": "abas ",
"account_number": "XXXXXXXX",
"txRef": "XXXXXXXXX",
"outstanding_balance": "XXXXXXX"
}
Failed Response
When the provided Smart Card Number or Payment Code is wrong, You shall get a failed notification response with a description of the response
{
"status": 201,
"message": "Failed",
"account_number": "XXXXXX",
"description": "XXXXX"
}