GetBuyWithFiatQuote

Get a quote containing an intent id and onramp link for a fiat to crypto swap.

Usage

using Thirdweb.Pay;
public async void GetQuote()
{
string connectedAddress = await ThirdwebManager.Instance.SDK.Wallet.GetAddress();
BuyWithFiatQuoteParams fiatQuoteParams = new BuyWithFiatQuoteParams(
fromCurrencySymbol: "USD", // US Dollar
toAddress: connectedAddress, // Receiver address
toChainId: "137", toTokenAddress: Utils.NativeTokenAddress, // MATIC
toAmount: "20" // I want to buy 20 MATIC
);
BuyWithFiatQuoteResult quote = await ThirdwebManager.Instance.SDK.Pay.GetBuyWithFiatQuote(fiatQuoteParams);
ThirdwebDebug.Log($"Quote: {JsonConvert.SerializeObject(quote, Formatting.Indented)}");
}