How to use the QR code to accept online payment?

After creating an account, you will have a Smart Contract QR code. Share this code to allow others to easily send tokens or funds to your contract.

For each transaction made to your smart contract, it clearly states the wallet from which the payment is made. Therefore, by allowing your customers to bind their WEB3 wallet addresses to their accounts, you can ensure accurate customer identification and adjust account balances based on their wallet addresses. Here is a step-by-step tutorial guide on how to assist your customers in completing this binding process, including generating a random number as a crucial step for authentication.

Step 1: Provide the binding option

Create an option for “Bind WEB3 Wallet” on your merchant platform or website and make it available on the customer account settings or profile page. Ensure that this option is easily accessible and presented clearly to your customers.

Step 2: Request the customer’s wallet address

When customers choose to bind their WEB3 wallet, prompt them to enter their WEB3 wallet address. You can provide an input field for customers to enter their address or use other appropriate methods to collect this information. Please make sure that the wallet address has never been binding with another account.

Step 3: Generate a random deposit number

To verify that the customer is the owner of the wallet address, the system needs to generate a random number. This random number should be a value with two digits and two decimal places. You can use the appropriate code to generate this random number and store it in the backend system.

Step 4: Display the random deposit number

Show the generated random number to the customer. You can display this number on the customer’s profile page or in a notification and explain that the customer needs to use this number for depositing to complete the binding process.

Step 5: Deposit verification

Ask the customer to make a deposit using their WEB3 wallet, with the amount exactly matching the randomly generated number by the system. The customer should transfer this amount to your smart contract.

Step 6: Confirm the binding

Once the customer successfully deposits the generated random number, the system needs to verify the deposit and confirm the binding process. Your backend system should check if the deposit matches the generated random number and successfully bind the customer’s WEB3 wallet address to their account.

After binding the web3 wallet, you can show the QR code as a deposit option for the customer.

Only show the QR code payment option to the users who already bind their web3 wallet with the account.

Last updated