Prepare transactions
This API call is made to prepare a transaction.
Method: POST
URL: {{base_url}}/api/pay-tv/post
This call has no parameters however the request body is as follows
{
"ProviderName":"DSTV", //dstv or gotv
"BasketId": 422248, //must be the basketid returned from getAccountDetails
"SmartCardNumber": 1049895922, //the smart card number
"CustomerNames":"BROWN", //the names obtained from getAccountDetails
"phoneNumber": "254743589765",
"paymentTypeId":1,
"amount": 1050,
"paidBy":"BROWN" //the names obtained from getAccountDetails
"Route":"1" //Values should be either 1 or 2
}
Response
Output | Type | Description |
---|---|---|
Pin | string | pin |
CustomerNames | string | customer names |
MerchantReference | string | merchant reference detail |
ProviderName | string | provider name |
SmartCardNumber | int | smart card number |
BasketId | string | unique identifier per transaction |
PayUVasReference | string | PayU reference |
PayUReceiptNumber | string | PayU receipt number |
CreatedAt | string | date of creation |
ID | string | id |
ReceiptNumber | int | receipt number |
LocalReceiptNumber | string | receipt number |
TransactionDate | string | transaction date |
ReferenceNumber | string | reference number |
BankName | string | bank name |
BranchName | string | branch name |
Payee | string | payee |
PaymentTypeID | int | payment type id |
Amount | int | amount |
PaidBy | string | user name |
Tendered | int | amount paid |
SourceIp | string | source ip |
TransactionID | int | transaction id |
MerchantID | string | merchant id |
Narration | string | narration |
PaymentDetail | string | payment detail |
PhoneNumber | int | user phone number |
Sample response
{
"Pin": null,
"CustomerNames": "BROWN",
"MerchantReference": null,
"ProviderName": "DSTV",
"SmartCardNumber": "104989599",
"BasketId": "427888",
"PayUVasReference": null,
"PayUReceiptNumber": null,
"CreatedAt": "2022-06-28T09:28:28.9199373+03:00",
"ID": "3cee9488-abf6-ec11-946a-7427ea2f7f59",
"ReceiptNumber": null,
"LocalReceiptNumber": null,
"TransactionDate": null,
"ReferenceNumber": null,
"BankName": null,
"BranchName": null,
"Payee": null,
"PaymentTypeID": 1,
"Amount": 10.0,
"PaidBy": "BROWN",
"Tendered": 10.0,
"SourceIP": null,
"TransactionID": "1049219",
"MerchantID": null,
"Narration": null,
"PaymentDetails": null,
"PhoneNumber": "254712345678"
}
Example of the API call: {{base_url}}/api/pay-tv/post