Docs

BuyWithFiatStatus

The returned object from getBuyWithFiatStatus function

If the in invalid intentId is provided, the object will have a status of "NOT_FOUND" and no other fields.

type BuyWithFiatStatus =
| { status: "NOT_FOUND" }
| {
failureMessage?: string;
fromAddress: string;
intentId: string;
purchaseData?: object;
quote: {
createdAt: string;
estimatedDurationSeconds?: number;
estimatedOnRampAmount: string;
estimatedOnRampAmountWei: string;
estimatedToTokenAmount: string;
estimatedToTokenAmountWei: string;
fromCurrency: {
amount: string;
amountUnits: string;
currencySymbol: string;
decimals: number;
};
fromCurrencyWithFees: {
amount: string;
amountUnits: string;
currencySymbol: string;
decimals: number;
};
onRampToken: PayTokenInfo;
toToken: PayTokenInfo;
};
status:
| "NONE"
| "PENDING_PAYMENT"
| "PAYMENT_FAILED"
| "PENDING_ON_RAMP_TRANSFER"
| "ON_RAMP_TRANSFER_IN_PROGRESS"
| "ON_RAMP_TRANSFER_COMPLETED"
| "ON_RAMP_TRANSFER_FAILED"
| "CRYPTO_SWAP_REQUIRED"
| "CRYPTO_SWAP_COMPLETED"
| "CRYPTO_SWAP_FALLBACK"
| "CRYPTO_SWAP_IN_PROGRESS"
| "CRYPTO_SWAP_FAILED";
toAddress: string;
};