The FanitePay TV Subscriptions payment API allows you to recharge tv subscriptions for DSTV, GOTV, STARTIMES and ZUKU.
This method is to Verify SmartCard Numbers only for DSTV and GOTV, kindly skip this step for Startimes and ZUKU.
Verify SmartCard Number:
var axios = require("axios").default;
var options = { method: 'POST', url: '{host}/tv/verify', headers: { Accept: '*/*', Authorization: 'Bearer FNTPPUBK_LIVE-***************', 'Content-Type': 'application/json' }, data: { acc_no: "xxxxxxxxxxxxxx", //gotv or dstv smart Card Number provider: "gotv", //only accepted provider is dstv and gotv }};
axios.request(options).then(function (response) { console.log(response.data);}).catch(function (error) { console.error(error);});Response:
{ "success": 1, "data": { "CustomerName": "Customer Name", "CustomerId": "xxxxxxxxxxx", "inTxId": xxxxxx }}This method to Fetch package bundles and their respective prices only for DSTV and GOTV, before proceeding to making subscription, kindly skip this step for Startimes and ZUKU.
Fetch Tv Bundles:
var axios = require("axios").default;
var options = { method: 'POST', url: '{host}/tvbundles', headers: { Accept: '*/*', Authorization: 'Bearer FNTPPUBK_LIVE-***************', 'Content-Type': 'application/json' }, data: { provider: "gotv", //only accepted provider is dstv and gotv }};
axios.request(options).then(function (response) { console.log(response.data);}).catch(function (error) { console.error(error);});Response:
{ "data": [ { "label": "GOTV Lite (UGX 15,000)", "description": "GOTV Lite (Monthly - 15000)", "id": "21546", "price": 15000, "isForex": 0 }, { "label": "GOtv Lite (UGX 35,000)", "description": "GOtv Lite (Quarterly - 35000/=)", "id": "215645", "price": 35000, "isForex": 0 }, { "label": "GOtv Lite 12 Months (UGX 95,000)", "description": "GOtv Lite 12 Months (95,000)", "id": "215466", "price": 95000, "isForex": 0 }, { "label": "Gotv Max Bouquet (UGX 49,000)", "description": "Gotv Max Bouquet (49,000)", "id": "215612", "price": 49000, "isForex": 0 }, { "label": "GOtv Plus (UGX 33,000)", "description": "GOtv Plus (33,000/=)", "id": "21555", "price": 33000, "isForex": 0 }, { "label": "GOtv Value (UGX 21,000)", "description": "GOtv Value (21,000)", "id": "21554", "price": 21000, "isForex": 0 } ], "success": 1}Parameters for the TV Subscription endpoint.
| Field | Description |
|---|---|
| name | Customer Full Names |
| The Customer Email | |
| phone_number | This indicates the phone number of the user. |
| billtype | The supported Bill type are startimes, zuku, gotv or dstv. |
| type | The supported types are STARTIMES, ZUKU, GOTV and DSTV |
| bundleId | The bundleId is the id of the package got after fetching tv bundles for only Dstv and Gotv, leave as null for Startimes and Zuku |
| amount | Amount should be the price of the same package selected after fetching tv bundles for only Dstv and Gotv, only enter price amount for Startimes and Zuku |
| acc_no | Decorder SmartCard Number or Account Number goes here |
| currency | Currency is UGX |
TV Subscription:
var axios = require("axios").default;
var options = { method: 'POST', url: '{host}/utilpay', headers: { Accept: '*/*', Authorization: 'Bearer FNTPPUBK_LIVE-***************', 'Content-Type': 'application/json' }, data: { name: "Customer Name", email: "customer@gmail.com", phone_number: "07xxxxxxxx", billtype: "gotv", //allowed Billtypes are startimes, zuku, gotv or dstv type: "GOTV", //allowed types are STARTIMES, ZUKU, GOTV and DSTV bundleId: "xxxxxx", //only for gotv and dstv, leave null for startimes and zuku amount: "15000", //get price from package selected only for gotv and dstv, enter own amount for startimes and zuku currency: "UGX", acc_no: "xxxxsxxxxxx", }};
axios.request(options).then(function (response) { console.log(response.data);}).catch(function (error) { console.error(error);});