Skip to main content

Pay Tv

The Pay TV feature is a user-friendly feature that empowers individuals and businesses to effortlessly manage and pay TV bills for both themselves and their clients. Streamlining the payment process, this feature provides a centralized platform where users can conveniently settle multiple TV subscriptions in one place. With secure payment options and an intuitive interface, staying on top of TV bills has never been easier.

Pay Tv Request Parameters

To intergrate to the Pay Tv feature, so as to allow users to make tv subscription payments, the following parameter are required.

ParameterTypeRequired?Description
secret_keystringyesThe secret key of your Lipila account
amountdoubleyesAmount being paid to the Tv service provider
accountNumberstringyesAccount Number for the recepient
externalIdstringnoThe external ID of the payment (optional)
narrationstringnoBrief transaction description
billTypestringyesTV Service Provider(e.g DStv, GoTv)

The Table below shows the different bill types based on the Tv Service provider

Tv Service providerbillType value
DStvDStv
GoTvGoTV
Top StarTopStar

To initialize the payment transaction, you need to pass the parameters in form of a request and sent to thee Paytv endpoint. The table below lists the full parameters for initializing a payment request.

Below is a sample snapshot of the Pay Tv request and the request Url.

curl -X 'POST' \
'https://lipila-uat.hobbiton.app/transactions/bills/pay-tv' \
-H 'accept: application/json' \
-H 'Authorization: Bearer YOUR_SECRET_KEY' \
-H 'Content-Type: application/json' \
-d '{
"billType": "DStv",
"externalId": "string",
"narration": "string",
"amount": 1,
"phoneNumber": "26096234057",
"accountNumber": "string"
}'

Make sure to replace YOUR_SECRET_KEY with your Lipila secret key. s

Pay TV Response

Once the payment request has been submitted, the API processes the transaction. Based on the result of the process, the API returns a response to the client. Below is a table of the data sent in a Pay TV response.

FieldTypeDescription
statusstringThe status of the transaction
messagestringThe message of the transaction
transactionIdstringThe transaction ID of the transaction
externalIdstringThe external ID of the transaction
amountdoubleAmount paid to the service provider
accountNumberstringAccount being paid for
accountHolderNamestringName of Account Holder

Response Status Codes

CodeDescription
201Purchase Successful
400Invalid / Bad Request- Check to verify that the required data is being sent in the right formats
401UnAuthorized- Check to verify that you are sending the correct API key.
500Internal Server Error- Contact Support

Below is an example of a Transaction sent for processing response:

{
"status": "Pending",
"message": "Transaction sent for processing",
"transactionId": "123456789",
"externalId": "32142",
"amount": 1.0,
"token" : "xxxxxxx"
}