attachCheckoutTransactionSource
Attaches a wallet source to a checkout transaction. This tells the checkout system which wallet address and chain the payment will come from, enabling accurate quote generation. Call this aftercreateCheckoutTransaction and before getCheckoutTransactionQuote.
Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
transactionId | string | The checkout transaction ID returned by createCheckoutTransaction. |
fromAddress | string | The wallet address that will fund the transaction. |
fromChainId | string | The network ID of the source chain (e.g., '1' for Ethereum mainnet, '137' for Polygon). |
fromChainName | Chain | The blockchain chain (e.g., 'EVM', 'SOL'). |
Returns
Promise<CheckoutTransaction> - The updated transaction with the source wallet attached.
Examples
Attach an EVM wallet
Attach a Solana wallet
Related
createCheckoutTransaction- Create a transaction (call first)getCheckoutTransactionQuote- Get a quote (call after attaching source)submitCheckoutTransaction- Submit the transaction