This endpoint is used to subsribe to tv bundle after the bundle type has be selected and card number has also been verified
{{base_url}}
/vas/tv/subscribe
Parameter | Type | Details |
---|---|---|
serviceCategoryId | string | id_ of the Provider selected |
bundleCode | string | Bundle code gotten from selected package |
current_bouquet | string | Current package gotten from Verify card number, provide bundlecode here if new subscriber |
amount | decimal | Your Amount , Must be rounded at 2 precision. |
cardNumber | string | The card number of the decoder you want to subscribe to. |
phone | string | Phone Number of subscriber. |
Request Example (guzzle)
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', '{{base_url}}/vas/mobile-data/purchase', [
'json' => [
'amount' => '100.00',
'serviceCategoryId' => 'xxxxxxxxxxx',
'bundleCode' => 'xxxxxxxxxx',
'amount' => '100.00',
'cardNumber' => 'xxxxxxxxxxx',
],
'headers' => [
'Authorization' => 'Bearer {{access_token}}',
'client-id' => 'sdaH23sE5Th4*******dDF4df',
'accept' => 'application/json',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
**Response: SUCCESS (200 OK)**
{
"message": null,
"data": {
"clientId": "673f225ce994ba0024cced6e",
"serviceCategoryId": "61e989f20e69308aa37a7a9f",
"reference": "4edfab8fab3f47e7819764a140b95ba5",
"status": "successful",
"amount": "1500",
"id": "67d3f91132ebf265b484a585",
"reciever": {
"number": null,
"customerNumber": null,
"distribution": "GOTV",
"vendType": "",
}
}
}
**Response: ERROR (403 FAILED)**
{
"message": {
"code": 403,
"error": [
"Requested with invalid token!"
]
},
"data": [],
"type": "error"
}