GetBuyWithCryptoStatus
Get swap status for a transaction hash returned by BuyWithCrypto.
using Thirdweb.Pay;public async void GetStatus(){BuyWithCryptoStatusResult status = await ThirdwebManager.Instance.SDK.Pay.GetBuyWithCryptoStatus(_txHash);if (status.Status == SwapStatus.FAILED.ToString())ThirdwebDebug.LogWarning($"Failed! Reason: {status.FailureMessage}");ThirdwebDebug.Log($"Status: {JsonConvert.SerializeObject(status, Formatting.Indented)}");}
string
: The transaction hash of the swap transaction returned by BuyWithCrypto.
A BuyWithCryptoStatusResult
object containing the following properties:
Quote quote; // The quote object containing the swap details.string swapType; // The swap type, see SwapType enum.TransactionDetails source; // The source transaction details.TransactionDetails destination; // The destination transaction details.string status; // The status of the swap, see SwapStatus enum.string subStatus; // The sub status of the swap, see SwapSubStatus enum.string fromAddress; // The source address.string failureMessage; // The failure message if the swap failed.string bridge // The bridge used for the swap if applicable.