For Marketplaces with custom contracts
A sample query string has been attached at the end of this page.
Note: All the query parameters marked with *(asterisk) are mandatory to send to successfully load the widget and complete the transaction.
Query Parameter | Example | Type | Default value | Description |
---|---|---|---|---|
apiKey * | 4fcd6904-706b-4aff-bd9d-77422813bbb7 | string | Your API key for authentication. | |
calldata * | Example | string | The calldata/hex that needs to be passed to your smart contract in order to execute the required function successfully. The calldata should contain the method ID of the function to be executed and the values of all the parameters in that function. You need to compress the calldata and send the output as the value for this query param. Code example on how to generate callata here. Note: If the function to be executed accepts user's wallet address as a parameter, while generating calldata you need enter the address of Transak's smart contract on that chain as the user's wallet address. List of Transak Smart Contract addresses | |
contractId* | 65eaccc7bc21f2780bcc442a | string | contractId is the unique identifier for a combination of your smart contract address and network. You can generate your contractId through dashboard.transak.com. For staging, your contract will be whitelisted immediately. But for production, we need to review the smart contract audit and then whitelist the smart contract on production. | |
cryptoCurrencyCode * | ETH | string | The code of the cryptocurrency that your smart contract accepts in order to execute the function. You can find the list of supported cryptocurrencies here. | |
estimatedGasLimit * | 54589 | number | Gas limit that needs to be filled while executing the transaction on your smart contract. You need to estimate the gas limit it will cost to execute the particular function on your smart contract. Please refer to Ethereum Gas Docs here for more info on this for EVM compatible chains. Note: This cannot be 0 | |
nftData * | Example | base64 encoded string | NFT data is an array that consists of only a single element. The value for this query param should be Base64 encoded. It contains: • imageURL (optional) • nftName (optional) • collectionAddress - address of NFT collection • tokenID - array of all token IDs • price - Price of NFT needs to be in crypto here (Price is to be passed as absolute crypto value. Ex: If price of NFT is 1 ETH or 1 USDT, pass 1 in price array and not 1*10^18) • quantity - Total quantity of NFTs in order • nftType - ERC721 or ERC1155 Refer to example for code structure. Note: We will consider quantity as the reference to determine the number of NFTs to be purchased. If quantity is sent as 1 and there are 4 token IDs, we’ll only consider the first token ID and price. Also the length of price and tokenID array should be same and equal to the quantity. And default value of nftType is ERC721. | |
isNFT * | true OR false | boolean | Pass this as “true”. Note: If this is passed all these query parameters should be passed compulsorily - “callData”, "contractId", “cryptoCurrencyCode”, “estimatedGasLimit”, “nftData” | |
walletAddress | 0x86349020e9394b2BE1b1262531B 0C3335fc32F20 | string | The blockchain address of the user's wallet that the purchased NFT will be sent to. Users will be able to edit the wallet address. The wallet address needs to be valid for the NFT and blockchain network so to make sure this works you should pass cryptoCurrencyCode or network. | |
fiatCurrency | GBP | string | The code of the fiat currency you want the customer to buy NFT in. If the fiat currency is not supported by a specific product type then the default widget will load with all the supported fiat currencies for that product type. You can find all the supported fiat currencies here. | |
defaultFiatCurrency | GBP | string | The three letter code of the fiat currency your user will send/receive while buying/selling cryptocurrency. Users can change the fiat currency if this is passed. If the fiat currency is not supported by a specific product type then the default widget will load with all the supported fiat currencies for that product type. This parameter will be skipped if fiatCurrency or countryCode is passed. | |
countryCode | IN | string | The country's https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. The fiat currency will be displayed as per the country code. If the country code is not supported by a specific product type then the default widget will load with all the supported countries for that product type. This parameter will be skipped if fiatCurrency is passed. | |
defaultPaymentMethod | credit_debit_card | string | The default payment method you would prefer the customer to buy/sell with. If you pass this param, the payment method will be selected by default and the customer can also select another payment method. This parameter will be skipped if paymentMethod is passed. Refer here to the list of supported params for the payment method. | |
paymentMethod | credit_debit_card | string | The payment method you want to show to the customer while buying/selling. If you pass this param, then the payment method will be selected by default and the customer won't be able to select another payment method. Refer here to the list of supported params for the payment method. | |
disablePaymentMethods | credit_debit_card | string | A comma-separated list of payment methods you want to disable and hide from the customers. | |
[email protected] | string | The email that will be used to identify your customer and their order (usually the email that they registered with your app). Note: Please encode the email if it contains any special characters before passing it to query parameters. Otherwise, it will not be considered. Eg: [email protected] ==> Works [email protected] ==> will not work. | ||
userData | Example | object | Here you can pass your user's data like their name, address, date of birth in the object format. If you will pass all the basic user's data, the customer won't be prompted to enter it. | |
partnerOrderId | 5e2f559511a9de | string | An order ID that will be used to identify the transaction once a webhook is called back to your app. This can be your identifier to track your customers. | |
partnerCustomerId | 23487492 | string | A customer ID that will be used to identify the customer that made the transaction once a webhook is called back to your app. | |
disableWalletAddressForm | true | boolean | false | When true, the customer will not be able to change the destination address of where the cryptocurrency is sent to. Note: When this is used, walletAddress query param should be passed. |
themeColor | 000000 | string | The theme color code for the widget main color. It is used for buttons, links and highlighted text. Only hexadecimal codes are accepted. | |
widgetHeight | 100% | string | 100% | Height of the widget iFrame. Note: This param will only work with our SDK integration method. |
widgetWidth | 100% | string | 100% | Widget of the widget iFrame. Note: This param will only work with our SDK integration method. |
hideMenu | true | boolean | false | When true, then the customer will not see the menu options. This will hide the menu completely. |
isFeeCalculationHidden | true | boolean | false | When true, then the customer will not see our fee breakdown. The customer will only see the total fee. This parameter will be ignored if your fee (on top of us) is more than 1%. |
exchangeScreenTitle | Buy NFT | string | To change the exchange screen title. | |
colorMode | colorMode=LIGHT or colorMode=DARK | string | To customise the Transak widget's color mode, add the colorMode parameter next to your API key.Pass this query parameter to set up your preferred color mode: https://global-stg.transak.com/?apiKey=YOUR_API_KEY& colorMode=<LIGHT/DARK> ]() Set colorMode=LIGHT for light mode or colorMode=DARK for dark mode. Note: If you do not specify the colorMode parameter, the widget will follow your system's default theme. For example, if your system is set to dark mode, the Transak widget will also display in dark mode, and vice versa. |
Sample query string:
https://global-stg.transak.com/
?apiKey=9cd32351-8603-4475-8357-143f4f4cc660
&isNFT=true
&contractId=65e190486b6f1ff7309f9576
&estimatedGasLimit=334399
&calldata=eJzFVsuNJTEIzGUisPk7HLAhhg1%2FmdOcevT0rLdbp1YbhF2IKr7GnxI%2FigTjCXZwEDEtjtiB4SEji4POzL2x9hb2VEEkNlkKgioqzOqUcphYWXRKIneEqLE%2F1nob%2By590pt5FoOaCRC%2Bqv8L%2FS8Cnw5gBnejpKJ7QqHJKw2hVi4xLVinFlXYp%2FKtg0cMyYlw9hwwkrSqpD8hFyGJFM%2F41Ptfg9ylz7v0MW9HQggwTOGcp4gF0VN5aHst3kMT0USOpO2gkcJTtcxuL3LDxDT5gDS8hM%2FzF5KtmRuWHgkeVIbjiIyFXtQK6Ryuy2505ET8L%2F6y%2BSOvQZeDdK2Dl5P4XP%2FfzM%2BbPvSD99%2FP2D4Pdz72Nmg6AaDPEuVd%2Bu06NONU7OxDAUcu1mIWiqFusx0X8XggdDz4%2FF5Q3Leeaqc6GlG8CeZ0xu6RL8ujvZzYJt15nLcp9%2B9eV9aACrp1oK%2B%2FYxLsYA%3D%3D
&nftData=WwoJeyAKICAgICAgICAgICAgICAgIm5mdE5hbWUiOiAiUG9rZW1vbiBNZXRhZGF0YSBMZWdlbmRzIiwKICAgICAgICAgICAgICAgICJpbWFnZVVSTCI6ICJodHRwczovL2Fzc2V0cy50cmFuc2FrLmNvbS9pbWFnZXMvZ2VuZXJhbC90cmFuc2FrLXRlc3QtbmZ0LnBuZyIsCgkJImNvbGxlY3Rpb25BZGRyZXNzIjogIjB4ZjU3OGI2YkI0RkE1Yzc0MDMxNDdDMjliZTg2NGY1ZTEyQkYyMTFhMCIsCgkJInRva2VuSUQiOiBbIjY3NjEyNTQ1IiwgIjk4MTg2MjQwIl0sCgkJInByaWNlIjogWzEwLDEwXSwKCQkicXVhbnRpdHkiOiAyCgl9Cl0=
&network=immutablezkevm
&cryptoCurrencyCode=USDC
Updated 3 months ago