@reown/appkit-pay
npm package.pay
. This function receives two parameters.
baseSepoliaETH
.
useAvailableExchanges(options?: { isFetchOnInit?: boolean } & GetExchangesParams): UseAvailableExchangesReturn
options
: Control initial fetch behavior.returns
: { data, isLoading, error, fetch }
type GetExchangesParams= { page?: number asset?: string amount?: number | string network?: CaipNetworkId }
usePayUrlActions(): { getUrl, openUrl }
getUrl(exchangeId, params): Promise<PayUrlResponse>
openUrl(exchangeId, params, openInNewTab?): Promise<PayUrlResponse>
(Returns { url, sessionId }
)useExchangeBuyStatus(params: UseExchangeBuyStatusParameters): UseExchangeBuyStatusReturn
params
: { exchangeId, sessionId, pollingInterval?, isEnabled?, onSuccess?, onError? }
returns
: { data, isLoading, error, refetch }