Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt

Use this file to discover all available pages before exploring further.

function useX402(options: FetchWithX402Options): FetchWithX402ReturnType;
Hook that provides a fetch function with X402 payment handling.

Parameters

ParameterTypeDescription
optionsFetchWithX402OptionsConfiguration object for the fetch function

Returns

FetchWithX402ReturnType A fetch function with X402 payment handling

Example

const { fetchWithPayment } = useX402();
const response = await fetchWithPayment("https://x402-resource.com", {
  method: "GET",
});