How to Use Advanced Query Parameters

Detailed examples and usage for complex query parameters like walletAddressesData, userData, redirectURL, and more
View as Markdown

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.

1{
2 "networks": {
3 "ethereum": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1" },
4 "polygon": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1", "addressAdditionalData": "123456" }
5 },
6 "coins": {
7 "BTC": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1" },
8 "DAI": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1" },
9 "BNB": { "address": "0x6353D15E8A61df4eD412746654D44B8188a737C1", "addressAdditionalData": "123456" }
10 }
11}

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:
1{
2 "orderId": "Transak order ID",
3 "fiatCurrency": "Payout fiat currency",
4 "cryptoCurrency": "Token symbol to be transferred",
5 "fiatAmount": "Expected payout fiat amount",
6 "cryptoAmount": "Amount of crypto to be transferred",
7 "isBuyOrSell": "Sell",
8 "status": "Transak order status",
9 "walletAddress": "Destination wallet address",
10 "totalFeeInFiat": "Total fee charged in local currency",
11 "partnerCustomerId": "Partner's customer ID",
12 "partnerOrderId": "Partner's order ID",
13 "network": "Network for the crypto transfer"
14}
  1. 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.

1{
2 "firstName": "Satoshi",
3 "lastName": "Nakamoto",
4 "email": "satoshi.nakamoto@transak.com",
5 "mobileNumber": "+15417543010",
6 "dob": "1994-08-26",
7 "address": {
8 "addressLine1": "170 Pine St",
9 "addressLine2": "San Francisco",
10 "city": "San Francisco",
11 "state": "CA",
12 "postCode": "94111",
13 "countryCode": "US"
14 }
15}

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.

ParameterDescription
orderIdTransak order ID
fiatCurrencyPayout fiat currency
cryptoCurrencyToken symbol to be transferred
fiatAmountExpected payout fiat amount
cryptoAmountAmount of crypto to be transferred
isBuyOrSellSell for off-ramp flows
statusTransak order status
walletAddressDestination wallet address
totalFeeInFiatTotal fee charged in local currency
partnerCustomerIdPartner’s customer ID (if present)
partnerOrderIdPartner’s order ID (if present)
networkNetwork 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.

1[
2 {
3 "cryptoCurrencyCode": "AUSDC",
4 "cryptoCurrencyName": "Aave USDC",
5 "cryptoCurrencyImageURL": "https://assets.coingecko.com/coins/images/11674/standard/aUSDC.png?1696511564"
6 }
7]

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.

1[
2 {
3 "sourceTokenCode": "USDC",
4 "sourceTokenAmount": 10
5 }
6]

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).

1[
2 {
3 imageURL: "https://pokemon-nfts.s3.ap-southeast-2.amazonaws.com/images/1.png", // string
4 nftName: "Pokemon Metadata Legends", // string
5 collectionAddress: "0x8a20e9e8e736643161ce6a2fe8dd8dd62050cd1e", // string
6 tokenID: ["6", "7", "8"], // string[]
7 price: [15, 15, 15], // number[]
8 quantity: 3, // number
9 nftType: "ERC721" // "ERC721" | "ERC1155"
10 }
11]

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.

1[
2 {
3 nftName: "Fight Club", // string
4 imageURL: "https://i.seadn.io/s/raw/files/c9c65ccb29917aa39b449573090b9222.png", // string
5 collectionAddress: "0xc491a4a3601e9923366823523efe29415f6430c3", // string
6 tokenID: ["0", "1", "2"], // string[] | number[]
7 marketplace: "opensea", // string
8 normalizeRoyalties: false // boolean
9 }
10]

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 for a step-by-step guide.

0xf6ad734200000000000000000000000008d30445495bbcb3bab60ef5b4d1ecc3fcc65ae76334586972637676557a4e6d545756716e353456785a0000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000018b04b4d265...