*** title: How to Use Advanced Query Parameters slug: guides/how-to-use-advanced-query-params subtitle: >- Detailed examples and usage for complex query parameters like walletAddressesData, userData, redirectURL, and more ---------------------------------------------------- Some query parameters accept structured objects or arrays instead of simple strings. This guide provides detailed examples and explains how each parameter works so you can integrate them correctly. ## Wallet Configuration Set up destination wallets and control how users interact with the crypto transfer step. Use this parameter to specify different wallet addresses for multiple networks or coins in a single request. If a currency requires a secondary identifier (tag, memo, or destination tag), include it in the `addressAdditionalData` field. ```json { "networks": { "ethereum": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1" }, "polygon": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1", "addressAdditionalData": "123456" } }, "coins": { "BTC": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1" }, "DAI": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1" }, "BNB": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1", "addressAdditionalData": "123456" } } } ```
You can provide addresses keyed by **network name** or by **coin symbol**. The widget will automatically pick the correct address based on the user
Enable wallet redirection to let your app handle the crypto transfer step directly. This is especially useful for off-ramp flows where you want to redirect users to your own withdrawal page with pre-filled transaction details. **With redirectURL** When `walletRedirection=true` is passed **with** a `redirectURL` (and `productsAvailed=SELL`): 1. The user is redirected to the `redirectURL` with order info appended as query parameters when they click **Transfer Crypto** on the *Complete Your Transfer* page. 2. A `TRANSAK_WALLET_REDIRECTION` JavaScript event is emitted with the following payload: ```json { "orderId": "Transak order ID", "fiatCurrency": "Payout fiat currency", "cryptoCurrency": "Token symbol to be transferred", "fiatAmount": "Expected payout fiat amount", "cryptoAmount": "Amount of crypto to be transferred", "isBuyOrSell": "Sell", "status": "Transak order status", "walletAddress": "Destination wallet address", "totalFeeInFiat": "Total fee charged in local currency", "partnerCustomerId": "Partner's customer ID", "partnerOrderId": "Partner's order ID", "network": "Network for the crypto transfer" } ``` 3. It is up to the partner to redirect users to their crypto withdrawal page by pre-filling the relevant details from the URL parameters or the event payload. **Without redirectURL** When `walletRedirection=true` is passed **without** a `redirectURL`: 1. Only the `TRANSAK_WALLET_REDIRECTION` frontend event is sent (with the same payload as above). 2. The partner listens for this event and redirects users to their crypto withdrawal page, pre-filling: * `cryptoCurrency` * `cryptoAmount` * `network` * `walletAddress`
*** ## User Identity & KYC Pre-fill user details to speed up onboarding and reduce friction during KYC verification. Pre-fill user identity details to streamline or skip the KYC form entirely. If all required fields — name, email, mobile number, date of birth, and address — are provided, the user will not be prompted to enter them again. ```json { "firstName": "Satoshi", "lastName": "Nakamoto", "email": "satoshi.nakamoto@transak.com", "mobileNumber": "+15417543010", "dob": "1994-08-26", "address": { "addressLine1": "170 Pine St", "addressLine2": "San Francisco", "city": "San Francisco", "state": "CA", "postCode": "94111", "countryCode": "US" } } ```
**US Postal Code Format:** The correct format is either 5 digits (`12345`) or 9 digits with a hyphen (`12345-6789`).
*** ## Redirects & Tracking Control where users land after completing a transaction and capture order details for your backend. After a transaction completes, the user is redirected to the URL you provide via `redirectURL`. Transak automatically appends the following query parameters so you can track the transaction on your end. | Parameter | Description | | ------------------- | -------------------------------------------- | | `orderId` | Transak order ID | | `fiatCurrency` | Payout fiat currency | | `cryptoCurrency` | Token symbol to be transferred | | `fiatAmount` | Expected payout fiat amount | | `cryptoAmount` | Amount of crypto to be transferred | | `isBuyOrSell` | `Sell` for off-ramp flows | | `status` | Transak order status | | `walletAddress` | Destination wallet address | | `totalFeeInFiat` | Total fee charged in local currency | | `partnerCustomerId` | Partner's customer ID (if present) | | `partnerOrderId` | Partner's order ID (if present) | | `network` | Network on which the crypto transfer is made | **Example redirect URL:** ``` https://www.url.com/?orderId={{id}}&fiatCurrency={{code}}&cryptoCurrency={{code}}&fiatAmount={{amount}}&cryptoAmount={{amount}}&isBuyorSell=Sell&status={{orderStatus}}&walletAddress={{address}}&totalFeeInFiat={{amount}}&partnerCustomerId={{id}}&partnerOrderId={{id}}&network={{code}} ```
The `redirectURL` parameter is supported across all integration methods — SDK, iFrame, Redirect Link, Webview, and React Native SDK. However, **deeplinking** (for example, redirecting users back into a mobile app) is only supported with the **Browser Redirection** integration method.
*** ## Token & Currency Configuration Customize which tokens and currencies are available in the widget, including custom or unlisted tokens. Use this parameter to display a custom cryptocurrency in the widget that isn't natively supported by Transak. Provide the token code, display name, and an image URL so it appears correctly in the UI. ```json [ { "cryptoCurrencyCode": "AUSDC", "cryptoCurrencyName": "Aave USDC", "cryptoCurrencyImageURL": "https://assets.coingecko.com/coins/images/11674/standard/aUSDC.png?1696511564" } ] ``` Specify which token the user should pay with and how much. This is useful when you want to lock in a particular source token and amount for a swap or on-ramp transaction. ```json [ { "sourceTokenCode": "USDC", "sourceTokenAmount": 10 } ] ``` *** ## NFT Checkout Parameters Configure NFT metadata, marketplace details, and smart contract calldata for NFT purchase flows. Pass NFT metadata to configure the NFT Checkout experience. Each entry describes a collection, including the token IDs, individual prices, quantity, and the NFT standard (`ERC721` or `ERC1155`). ```javascript [ { imageURL: "https://pokemon-nfts.s3.ap-southeast-2.amazonaws.com/images/1.png", // string nftName: "Pokemon Metadata Legends", // string collectionAddress: "0x8a20e9e8e736643161ce6a2fe8dd8dd62050cd1e", // string tokenID: ["6", "7", "8"], // string[] price: [15, 15, 15], // number[] quantity: 3, // number nftType: "ERC721" // "ERC721" | "ERC1155" } ] ``` Provide token metadata for marketplace-based NFT purchases via platforms like OpenSea. This parameter lets you pass collection details, token IDs, and marketplace-specific settings for the checkout flow. ```javascript [ { nftName: "Fight Club", // string imageURL: "https://i.seadn.io/s/raw/files/c9c65ccb29917aa39b449573090b9222.png", // string collectionAddress: "0xc491a4a3601e9923366823523efe29415f6430c3", // string tokenID: ["0", "1", "2"], // string[] | number[] marketplace: "opensea", // string normalizeRoyalties: false // boolean } ] ``` The `calldata` parameter contains the encoded hex data that is sent to your smart contract during a transaction. You'll need to generate this from your contract's ABI and compress it before passing it to Transak.
Not sure how to generate calldata? See [How to Generate Calldata for NFT Checkout](/guides/how-to-generate-calldata-for-nft-checkout) for a step-by-step guide.
``` 0xf6ad734200000000000000000000000008d30445495bbcb3bab60ef5b4d1ecc3fcc65ae76334586972637676557a4e6d545756716e353456785a0000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000018b04b4d265... ```