Skip to main content

Documentation Index

Fetch the complete documentation index at: https://anypay-docs-sdk-0-15-0-updates.mintlify.app/llms.txt

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

Focused components

Shared props

All focused components accept these optional props in addition to their mode-specific props.

Appearance

PropTypeDefaultDescription
theme"light" | "dark" | "auto""auto"Color theme; auto follows system preference
customCssstring | Record<string, string>Custom CSS to inject into the widget
disableCssbooleanfalseDisable default CSS injection
renderInlinebooleanfalseRender inline instead of as a modal
buttonTextstringCustom CTA button text

App metadata

Used in wallet connection dialogs (WalletConnect, etc.):
appMetadata={{
  name: "My App",
  url: "https://myapp.com",
  imageUrl: "https://myapp.com/logo.png",
  description: "Short description",
}}

Wallet options

PropTypeDescription
walletConnectProjectIdstringWalletConnect project ID
walletOptionsstring[]Wallet connector IDs to show (e.g. ["metamask", "walletconnect"])
wagmiConnectorsConnector[]Custom wagmi connectors
decoupleWagmibooleanDecouple from external wagmi provider
hideDisconnectbooleanHide the disconnect button
hideAddWalletbooleanHide “Add wallet” option
isSmartWalletbooleanSignal that the connected wallet is a smart wallet

Route options

PropTypeDescription
slippageTolerancenumber | stringSlippage tolerance (e.g. 0.005 for 0.5%)
swapProviderRouteProviderPreferred same-chain swap provider
swapProviderFallbackbooleanFall back if preferred swap provider is unavailable
bridgeProviderRouteProviderPreferred bridge provider
bridgeProviderFallbackbooleanFall back if preferred bridge provider is unavailable
priceImpactWarningThresholdBpsnumberBasis points before showing a price impact warning
priceImpactWarningMessagestringCustom price impact warning message
priceImpactFallbackBridgeUrlstringURL to redirect when price impact is too high
intentProtocolVersionIntentProtocolVersionForce a specific intent protocol version

Debug / dev

dev={{
  debug: true,
  sequenceIndexerUrl: "https://...",
  trailsApiUrl: "https://...",
}}

General callbacks

These callbacks are available on all focused components (in addition to mode-specific lifecycle callbacks):
CallbackWhen it fires
onOpenWidget modal opens
onCloseWidget modal closes
onOriginConfirmationOrigin-chain transaction confirmed
onDestinationConfirmationDestination-chain transaction confirmed
onQuoteQuote is received
onSignRequestWallet signature requested
onSignWallet signature obtained
onSignRejectUser rejected the signature
onApproveRequestERC-20 approval requested
onApproveERC-20 approval confirmed
onApproveRejectUser rejected the approval
onStatusTransaction status update

ChainIdentifier

All chain fields accept a ChainIdentifier, which can be:
  • A chain name string: "base", "ethereum", "polygon", "arbitrum", "optimism", "avalanche", "bsc", "katana", etc.
  • A numeric chain ID: 8453, 1, 137, etc.
  • A viem Chain object

PaymentMethod

The paymentMethod prop on focused components accepts:
ValueMethod
"CONNECTED_WALLET"Connected wallet (default when omitted)
"CRYPTO_TRANSFER"QR code / address deposit
"CREDIT_DEBIT_CARD"Fiat on-ramp (credit/debit card)
"EXCHANGE"CEX transfer (Coinbase, Binance, etc.)

Mode-specific props

See the individual mode pages for full prop details:
  • Payto.recipient, to.currency, to.chain, to.amount, payMessage, onPaymentStart/Success/Error
  • Fundto, fundMethodsList, hideUnlistedFundMethods, hideSwap, onFundingStart/Success/Error
  • Swapfrom, to, onSwapStart/Success/Error
  • Withdrawfrom, to, onWithdrawStart/Success/Error
  • Earnto with calldata, onEarnStart/Success/Error