Transak Integration for Crypto Purchase in a Mobile App
Transak differs from competitors with lower fees (from 0.5% on bank transfer), support for both on-ramp and off-ramp in one widget, and relatively lenient KYC thresholds for many countries. An official React Native SDK exists, but for native iOS/Android projects, integration is via WebView with a custom URL.
Forming the URL for Transak Global
Base URL: https://global.transak.com
// Android — building the URL
val params = mapOf(
"apiKey" to transakApiKey,
"walletAddress" to userWalletAddress,
"network" to "ethereum", // ethereum, bsc, polygon, solana
"defaultCryptoCurrency" to "USDC",
"fiatCurrency" to "EUR",
"productsAvailed" to "BUY", // BUY, SELL, or BUY,SELL
"hideMenu" to "true", // remove Transak navigation
"themeColor" to "1A1A2E", // hex without #
"redirectURL" to "myapp://transak-callback",
"exchangeScreenTitle" to "Buy USDC"
)
val queryString = params.entries.joinToString("&") { (k, v) -> "$k=${URLEncoder.encode(v, Charsets.UTF_8)}" }
val widgetUrl = "https://global.transak.com/?$queryString"
For production, use the API key from dashboard.transak.com. Staging key (STAGING_TRANSAK_API_KEY) for testing: Transak's test cards accept 4111111111111111 with any CVV.
Partner Integration: Signature
For a production account, Transak requires a signed JWT for authorized partners. Without it, the widget works as public (with Transak branding). With a partner signature, you get custom branding and lower fees.
// Server-side JWT generation (Node.js)
const jwt = require('jsonwebtoken');
const payload = {
apiKey: process.env.TRANSAK_API_KEY,
walletAddress: userWalletAddress,
userData: { firstName, email } // optional, for pre-KYC
};
const token = jwt.sign(payload, process.env.TRANSAK_SECRET, { expiresIn: '1h' });
// Pass token to app, add as &partnerOrderId={token}
Supported Networks and Tokens
Transak supports 130+ countries and 90+ cryptocurrencies. Check availability for a specific country:
GET https://api.transak.com/api/v2/currencies?partnerApiKey={apiKey}&isBuyOrSell=BUY
Returns a list of cryptocurrencies with available networks, minimum amounts, and supported payment methods by country. More up-to-date than documentation.
Webhook Events
Transak sends events via webhook to your server. Key events:
-
ORDER_CREATED— user initiated a purchase -
PAYMENT_DONE_MARKED_BY_USER— user confirmed payment -
ORDER_COMPLETED— crypto sent to wallet -
ORDER_FAILED— purchase failed
Webhook verification via signature hash is mandatory. Transak signs the payload with HMAC-SHA512 using a secret key.
Timeline: 2–3 days to form and open the widget, handle deeplink callback on return, integrate webhooks for final statuses, and update balance in the app.







