How can I implement buy Nft Item from marketplace service properly?
Last updated
Last updated
We support Nft listing with different currencies on the marketplace. Therefore, during the purchase of an Nft Item listed on the marketplace, the steps to be taken may vary depending on the currency offered for sale.
If the Nft Item that you want to buy has been put up for sale with the coin of the blockchain you are working on, you can continue the flow by using the service.
If the Nft Item that you want to buy has been put up for sale with a crypto token (ERC-20), we need to check whether the buyer address allows the crypto tokens to be used during the purchase. If permissioned, purchase can be performed on the marketplace without getting an error on the blockchain. Otherwise the permission process must be performed first. You can see QafNft services below that should be used to perform this flow.
If the service returned true, it means that the approval permission has been received. You can continue with the service.
If the service returned false, it means that the approval permission has not been received. You need to get approval permission using the service.
This service will be returned Init transaction information. You should trigger the user's wallet provider with the returned information and confirm the transaction.
After you see that the approved transaction has been completed successfully, you can continue the flow by using the service.
This service will be returned Init transaction information. You should trigger the user's wallet provider with the returned information and confirm the transaction.
After you see that the approved transaction has been completed successfully, you can retrieve the information of your sold Nft Items using the service.