Checkout
Last updated
{
"webhookMetadata": "webhookMetadata", // metadata passed in during function input
"currencyMetadata": {
"exchangeRate": 0.005,
"fiatCurrency": "usd",
"cryptoCurrency": "eth_eth"
},
"value": "1.5",
"gasFees": "0.005",
"from": "0x40562Cf2E90f23b3969d782B5c8f134A77069b49",
"to": "0xfFEaf294106b610d0cdD4afaAfe861563c72BB76", // your treasury wallet address
}using System;
using Metafi.Unity;
public class CheckoutButton : MonoBehaviour {
public async void Checkout(){
await MetafiProvider.Instance.Checkout( new {
cost = "0.001",
currency = Assets.MUMBAI_MATIC,
itemDescription = "Pet NFT",
treasuryAddress = "your-treasury-address",
webhookMetadata = "{\"func\":\"buyNft\"}",
},
((System.Action<dynamic>) (result => {
Debug.Log("Checkout complete, result: " + result.ToString());
})));
}
}