Description:
Mainstream wallets such as imtoken,MetaMask support QR code payments generated from URLs. For example:
ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7@1/transfer?address=0x3D5Efb63587649DeCF2548D5Ed466569ca4548Bf&uint256=10793930
Scanning the QR code generated from the above link via a wallet app will display a payment page. This page pre-populates the recipient address, token type, and payment amount. After the user enters their password, the token can be sent to the specified recipient address.
But now we want the wallet can submit the transaction id to an URL after transaction is sent.
Purpose:
We hope to associate the sent transaction ID with a specific business ID, such as payments, product purchases, or other transactional activities. This would greatly simplify development workflows involving digital currencies, allowing developers to use a single wallet address to link transaction IDs with corresponding business IDs.
we want add a callback param in the URL,after the erc20 token transaction is sent,wallet will call the callback url,and sumbit the transaction to the url.For example:
ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7@1/transfer?address=0x3D5Efb63587649DeCF2548D5Ed466569ca4548Bf&uint256=107939303&callback=${callbackURL}
The URL contains a callback URL parameter ${callbackURL} to be used after sending the transaction. When the wallet app sends the transaction and receives the transaction ID on the chain, it can send the transaction ID to the callback URL.
A wallet selection interface will appear, prompting the user to choose an address with sufficient funds on the relevant chain. Subsequently, a payment interface will be displayed, pre-populating the recipient address, token address, amount. The user can then enter their password to initiate the transaction.
Upon transaction submission, a notification containing the transaction Id will be sent to the specified URL.
&callback=${callbackURL}&txId=abcdfg
the param txId is the transaction id the wallet sent.
Both:
Images/Attachments: