Examples
walletAddressesData
In the case of currencies that use a secondary address identifier/tag/memo, it can be specified in the addressAdditionalData field.
{
networks: {
ethereum: { address: '0x6353D15E8A61df4eD412746654D44B8188a737C1' },
polygon: { address: '0x6353D15E8A61df4eD412746654D44B8188a737C1', addressAdditionalData: '123456' },
},
coins: {
BTC: { address: '0x6353D15E8A61df4eD412746654D44B8188a737C1' },
DAI: { address: '0x6353D15E8A61df4eD412746654D44B8188a737C1' },
BNB: { address: '0x6353D15E8A61df4eD412746654D44B8188a737C1', addressAdditionalData: '123456' },
},
}
userData
{
firstName: 'Satoshi',
lastName: 'Nakamoto',
email: '[email protected]',
mobileNumber: '+15417543010',
dob: '1994-08-26',
address: {
addressLine1: '170 Pine St',
addressLine2: 'San Francisco',
city: 'San Francisco',
state: 'CA',
postCode: '94111',
countryCode: 'US',
},
}
The correct format of a US postal code can be either the first 5 digits alone or the complete 9 digits with a hyphen after the first 5 digits. For example, the valid formats are:
Five-digit format: "XXXXX" (e.g., 12345)
Nine-digit format: "XXXXX-XXXX" (e.g., 12345-6789)
nftData
[
{
imageURL: 'https://gateway.ipfs.io/ipfs/QmdPYeQ63YPWzXaTeWA1EfK3yYY6WN4mQQkRHABDwXqhcb',
nftName: 'My Test Collection',
collectionAddress: '0x12bd...',
tokenID: [123, 124, 167, 128],
price: [12, 13, 23, 34],
quantity: 4,
nftType: 'ERC721',
}
]
redirectURL
User will be redirected to the partner page passed in redirectURL
along with the following parameters appended to the URL:
orderId
: Transak order IDfiatCurrency
: Payout fiat currencycryptoCurrency
: Token symbol to be transferredfiatAmount
: Expected payout fiat amountcryptoAmount
: Amount of crypto to be transferredisBuyOrSell
: Will be 'Sell' in case of off rampstatus
: Transak order statuswalletAddress
: Destination wallet address where crypto should be transferredtotalFeeInFiat
: Total fee charged in local currency for the transactionpartnerCustomerId
: Partner's customer ID (if present)partnerOrderId
: Partner's order ID (if present)network
: Network on which relevant crypto currency needs to be transferred
For example, if you submit redirectURL=https%3A%2F%2Fwww.url.com, we will redirect the customer to 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}}
walletRedirection
Usage
- When
walletRedirection=true
is passed along withredirectURL
query param in case of SELL flow i.e.productsAvailed=SELL
then:- User will be redirected to the redirect URL with order info appended as parameters as mentioned here when user clicks on 'Transfer Crypto' CTA on 'Complete Your Transfer' page.
- An event called TRANSAK_WALLET_REDIRECTION is sent across with the following javascript object:
{
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
: <Will be 'Sell' in case of off ramp>
status
: <Transak order status>
walletAddress
: <Destination wallet address where crypto should be transferred>
totalFeeInFiat
: <Total fee charged in local currency for the transaction>
partnerCustomerId
: <Partner's customer ID (if present)>
partnerOrderId
: <Partner's order ID (if present)>
network
: <Network on which relevant crypto currency needs to be transferred>
} - It is upto the partner to redirect users to their crypto withdrawal page by pre-filling the relevant withdrawal details from the URL parameters or the frontend event json object.
- If
redirectUrl
query param is not passed along withwalletRedirection
then:- Only the TRANSAK_WALLET_REDIRECTION frontend event is sent along with the order metadata as mentioned above in point 1. (ii)
- Partner can read the above event and redirect users to their crypto withdrawal page by pre-filling the relevant withdrawal details (from the above mentioned js object) like:
cryptoCurrency
cryptoAmount
network
walletAddress
Updated about 2 months ago