
The diagram above summarizes transaction flow on lux terminals. A customer walks up to a merchant using lux terminal to carry out card transaction, ussd etc. The device interacts with a middleware to handle the transaction and notify the merchant the device is registered on.
Upon merchant registration, the merchant is expected to update her account with a callback url on the lux dashboard. Notification are pushed to the available callback and retried up to 4 times incase of fail over. The merchant is expected to ensure the notifications are handled using idempotent concept to avoid double crediting of Customer’s wallet.
Notification sample request sent to a Merchant for card transactions
{
"pan": "50xxx*********0xxx",
"rrn": "210505xxxxx",
"stan": 175xxx,
"amount": 1100,
"reference": "17xxx-506104172xxxxx-2033xxxx-210505xxxxxx4",
"cardExpiry": "2207",
"merchantId": "608eb78d739a5xxxxxx",
"terminalId": "20xxxx",
"statusCode": "00",
"transactionType":"card",
"serialNumber": "740xxxxx",
"statusDescription": "Successful Code",
"transactionDate": "1620233806032",
"hash": "84565b8bfcc9dcad9c157f111ea75eadf7971b8c2a604e5a2da0e1dff5355b0235ca94e910be7c7a62ae0697082eccaa7ba04e3fe1f54b4fcca05f57e485a2f3"
}
Notification sample request to a Merchant for ussd transactions
{
"amount": 60000,
"reference": "LUWDL-2033QAI7-000392-08164663359",
"merchantId": "6074ccxxxxxxxxxxx",
"statusCode": "25",
"transactionDate": "1622308784248",
"transactionType": "ussd",
"statusDescription": "Unable To Locate Record",
"hash": "71effa58907f312ed83d62c9d41fedd9241d7a3f0c73902d3c99a787f582538c0988c7902333f7b02f6fd612e1553678987991143127979d51009d30b14db104"
}
The hash value is a combination of some fields below using hash512
hash = secretKey + '|' + transactionReference + '|' + transaction amount + '|' + transaction date
To validate the notification is coming from lux, the merchant is expected to compare the hash result with the hash value in the notification field.
For every notification request sent, the merchant is expected to return a unique billing reference
{
"BillerReference": "feda5f1c-8c9a-40e1-893d-78db2247c065"
}