โโ๐โ Control the fiat or crypto options for the user
Your API key (apiKey) must be passed for parameters to work.
Fiat options
The Transak widget automatically defaults to the user's local currency based on their IP address and the cheapest payment method. If you want to set the fiat payment options for your users you can use the below parameters:
Fiat Currency
fiatCurrency
fiatCurrency
The fiat currency you want to limit the user to buy or sell cryptocurrency with. Users will not be able to change the selection.
Format is the currency's three letter ISO 4217 code e.g. GBP.
countryCode
countryCode
The country whose fiat currency you want to limit the user to buy or sell cryptocurrency with. Users will not be able to change the selection.
Format is the country's ISO 3166-1 alpha-2 code e.g IN.
Note: This parameter will be skipped if fiatCurrency is passed.
Payment method
All of the below parameters have the following possible values:
gbp_bank_transfer | pm_open_banking | credit_debit_card | apple_pay | google_pay |
inr_bank_transfer | inr_upi | sepa_bank_transfer | pm_pse | pm_us_wire_bank_transfer |
pm_astropay | pm_pix | pm_gcash | pm_paymaya | pm_bpi |
pm_ubp | pm_grabpay | pm_shopeepay |
defaultPaymentMethod
defaultPaymentMethod
The default payment method you would prefer the customer to purchase/sell with. If you pass a defaultPaymentMethod, the payment method will be selected by default and the customer can also select another payment method.
disablePaymentMethods
disablePaymentMethods
A comma separated list of one or more payment methods you want to disable and hide from users, e.g. gbp_bank_transfer
,sepa_bank_transfer
.
Crypto options
The Transak widget automatically defaults to ETH on Ethereum as the crypto option. Users can choose any of the other supported cryptocurrencies to purchase.
If you want to set the default and/or limit the cryptocurrency or blockchain options for your users you can use the below parameters.
See the full list of cryptocurrencies and blockchains we support, plus their codes for passing with the below parameters, see here: Crypto Currency Coverage.
Double check that your
cryptocurrency
andnetwork
codes match ours and the combination being passed is consistent. For exampleETH
is onethereum
notmainnet
.
Crypto Currency
defaultCryptoCurrency
defaultCryptoCurrency
The default cryptocurrency you would prefer the user to buy. Users will still be able to select another cryptocurrency, e.g. DAI
.
cryptoCurrencyCode
cryptoCurrencyCode
The cryptocurrency you want the user to buy. Users will not be able to select another cryptocurrency, e.g. USDT
.
The blockchain network will be the default, e.g. ETH
will be on ethereum
. You can pass the network
parameter if you want the cryptocurrency on a different network, e.g. &cryptoCurrencyCode=ETH&network=optimism
.
The user won't be able to select between multiples networks for the same cryptocurrency unless you pass the networks parameter.
cryptoCurrencyList
cryptoCurrencyList
A comma-separated list of cryptocurrencies that you want to allow your users to buy. Only these cryptocurrencies will be shown to the user in the widget.
Format is a string of comma separated values each of which must represent a valid cryptocurrency code, e.g. ETH,DAI,USDT
.
Blockchain network
For blockchains with multiple supported cryptocurrencies the network is specified by its name, e.g. ethereum
or solana
. This way you can limit users to all of the cryptocurrencies on a particular blockchain.
For blockchains where we only support the native asset the network is specified as mainnet
. Note that for the native asset on chains where multiple cryptocurrencies are supported the network is specified by the blockchain name, not mainnet
.
defaultNetwork
defaultNetwork
The default blockchain network you would prefer the user to buy cryptocurrencies on. Users will still be able to select another network, e.g. polygon
.
network
network
The blockchain network you want the customer to buy cryptocurrencies on. Users will not be able to select another network, e.g. ethereum
.
If you are passing cryptoCurrencyCode
you only need to pass network if you don't want users to purchase it on the default network.
networks
networks
A comma-separated list of blockchain networks that you want to allow your users to buy cryptocurrencies on. Only these networks' cryptocurrencies will be shown in the widget.
Format is a string of comma-separated values each of which must represent a valid network name, e.g. ethereum,optimism,arbitrum
.
Updated 5 months ago