Learn how to integrate your own wallet solution with Crossmint’s embedded checkout
payer
prop. This is useful when:
handleChainSwitch
to ensure the correct
network is set, then handleSignAndSendTransaction
to complete the purchase.payer
prop accepts the following configuration:
Property | Type | Description |
---|---|---|
address | string | The wallet address of the payer |
initialChain | PayerSupportedBlockchains | The initial blockchain (e.g. “polygon”, “ethereum”, “base-sepolia”) |
supportedChains | PayerSupportedBlockchains[] | Optional list of supported chains. Defaults to initialChain if not specified |
handleChainSwitch | (chain: PayerSupportedBlockchains) => Promise<void> | Function to handle chain switching |
handleSignAndSendTransaction | (serializedTx: string) => Promise<TransactionResponse> | Function to handle transaction signing and sending, where TransactionResponse is either { success: true, txId: string } or { success: false, errorMessage: string } |
handleSignAndSendTransaction