This is probably a basic question but I can not find an answer.
We are developing a BTC payment process for a Point-of-Sale. We have managed to build this fine and can make requests (QR code) for a payment amount in BTC. for example 0.0001 BTC
We then check the blockchain for an equivalent transaction on our address of amount 0.0001 BTC.
This works.
But seems unreliable. What if there were to be multiple transactions at around the same time for the same amount. I really want to be able to insert a unique identifier/order number or memo into the QR code request which then gets passed onto the transaction. This would link the request to the payment with a unique id. Is there a way to do this? It seems odd if there is not? Or is there another obvious way that I am missing?
We are using https://api.blockcypher.com to get the transaction details. Which look like below. There does not appear to be any kind of a "memo" parameter, although wallets and QR generators allow you to add such.
{
"tx_hash": "8bbe058b46f2f9a7e1709ca4a3ff731ba2227d23f2edf11eb8710dfcd6b1e502",
"block_height": 685568,
"tx_input_n": -1,
"tx_output_n": 0,
"value": 16692,
"ref_balance": 3417334,
"spent": false,
"confirmations": 4,
"confirmed": "2021-05-30T22:09:51Z",
"double_spend": false
},