Transaction completion confirmation from Metamask mobile after QR-code based scan & pay

I am trying to implement a QR-code based payments system.
Think of a scenario of a coffeeshop with a merchant POS which generates a QR-code for payment.
I, as the customer, opnes the MetaMask mobile app and scan the QR and approve the payment.

However, the merchant POS system has no way to know if the payment has been made. Is there a way to send transaction hash to a provided url endpoint after completion of payment from inside the MetaMask app to which the merchant POS app will keep listening to for getting confirmation of transaction?

Hello @arunanksharan !
Welcome to MetaMask community !

I see the solution to the problem in the following sequence:

  1. The QR code opens a web application with a payment page / a local coffeeshop application that is connected to a web3 provider

  2. On the client side, using promises to get the hash of the transaction after successful completion / generate an error if not.

An example is given here:

  1. Sending data over a secure connection to the server.

  2. Interaction with the database / notification of the POS terminal application.

2 Likes

Thank you for the response!
We are trying to implement this. :slight_smile:

2 Likes

@arunanksharan

Happy development! :partying_face:
If you have any questions, you can write over here.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.