How to generate a QR with the EIP-681 scheme and that when scanning with metamask mobile points me to a specific contract function by passing parameters

Good morning! I am having a problem when scanning QR codes that I generate in a page that I am developing. The transaction is directed to a smart contract. What I want is to identify the payments so as to be able to know if they were made completely. What I have done so far is to generate the qr with the EIP-681 scheme
with the following formats, to be able to hit a specific function of the contract by sending an ID:

ethereum:<CONTRACT_ADDRESS>?value=&gas=<GAS_LIMIT>&data=<DATA(CONTRACT_ADDRESS WITH PARAMETER ID IN HEXADECIMAL)>

ethereum:${contractAddress}/${functionName}?uint256=${paymentId}&value=&gas=<GAS_LIMIT>`

I’m looking to scan it from the MetaMask mobile application. In the first case it takes everything except the “data” field and in the second it also takes everything but it doesn’t go to the function that I specify. I forgot to clarify that I do not have the address of the wallet where the payment is made in advance, since the transaction is sent directly from the wallet that you have in your cell phone and from when you scan the QR code.
Do you know any solution?

Hello @Claudio, welcome to MetaMask community!

Have you checked up on MetaMask Docs for this? You can also go through the QR issues in MetaMask Github for related stuff or post your own issue.

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