My application manages sales with local payment methods and Ethereum/Bitcoin.
When using crypto payments a QR Code will be displayed for the customer, with the wallet's address and amount.
The issue I'm having is that if two transactions are made to two different customers with the same value, there'll be no way to distinguish which transaction is linked to the customer since I won't have his wallet address.
I thought of using the data input to append a unique ID from my platform, such as this:
>>> import json
>>> data = {'unique_id': 'test'}
>>> json_data = json.dumps(data)
>>> hex_bytes = bytes.fromhex(json_data.encode().hex())
>>> hex_bytes
b'{"unique_id": "test"}'
(the bytes value would be 0x7b22756e697175655f6964223a202274657374227d)
I verified that by signing and sending this transaction to the blockchain I was able to track the transaction as expected. What I'm not so sure is about the QR code. I can append this to the end of the address, but is this even a valid QR Code, that wallets or payment apps will recognize? I found the EIP 681 doc that seems to regulate this, but there's no explicit information about the data input.
Also, even if it's valid, has anyone ever done this? My fear is wasting my time on that, and then no app even has support for this param.