PayUIOptions

type PayUIOptions = Prettify<
{
buyWithCrypto?:
| false
| {
prefillSource?: {
allowEdits?: { chain: boolean; token: boolean };
chain: Chain;
token?: Partial<TokenInfo> & { address: string };
};
testMode?: boolean;
};
buyWithFiat?:
| {
onrampChainId?: number;
onrampTokenAddress?: string;
preferredProvider?: FiatProvider;
prefillSource?: { currency?: CurrencyMeta["shorthand"] };
supportedProviders?: Array<FiatProvider>;
testMode?: boolean;
}
| false;
metadata?: {
description?: string;
image?: string;
name?: string;
};
onPurchaseSuccess?: (
info?:
| { status: BuyWithCryptoStatus; type: "crypto" }
| { status: BuyWithFiatStatus; type: "fiat" }
| {
chainId: number;
transactionHash: Hex;
type: "transaction";
},
) => void;
purchaseData?: object;
showThirdwebBranding?: boolean;
>;