My app is calculating reward points based on each transaction and our program rewards cash to customers. So I just wondering what would be the best way to track refund activity.
I was trying to put a refund button in my app Mainpage so that I can scan the barcode on receipt and then pull out the transaction details, then do refund in Transactions. But how can I launch the app Transactions with specific transaction details open by scanning barcode? (The barcode contains payment_id) This approach has lots of drawbacks. For example, Transactions can only do fully refund but not partially refund. And this approach needs lots of human work. The cashier will need to be very careful and look at the receipt and identify whether this transaction is our program transaction. (we print our program name on receipt) The cashier then launches our app and do fully refund. There is a lot of chances for error to occur.
My second thoughts is that avoid human work and let my app listen to all refunds in the background. But I have no clue where to start. How can I get all refund object? Or is there any way that I can access the refund table in Clover database? How can I listen to refund from both app Orders and app Transactions ?
Thanks in advance!