Global fiat onramp (and offramp) widget with 170+ country coverage and bank-rail payment methods. Drop-in JS/React SDK, mobile SDKs, and a partner API for KYC reuse.
- 01fiat onramp in emerging markets
- 02broad payment-method support (UPI, SEPA, PIX)
- 03embeddable widget
- 04DApps needing low-friction first crypto purchase
- pnpm add @transak/transak-sdk
- pnpm add @transak/api-client
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_TRANSAK_API_KEY | Client | Transak partner API key. Use the staging key for `Transak.ENVIRONMENTS.STAGING` and the production key for `Transak.ENVIRONMENTS.PRODUCTION`. |
| TRANSAK_API_SECRET | Server | Server-side API secret used to sign widget URLs and authenticate the partner API. |
Use Transak for fiat onramp. Instantiate the widget with `new Transak({ apiKey: process.env.NEXT_PUBLIC_TRANSAK_API_KEY, environment: Transak.ENVIRONMENTS.PRODUCTION, defaultCryptoCurrency: 'USDC', walletAddress, network: 'ethereum' })` and call `transak.init()`. Listen for `Transak.EVENTS.TRANSAK_ORDER_SUCCESSFUL` to update UI, but always confirm settlement via the partner API or webhooks server-side. For deeper integrations use `@transak/api-client` to fetch quotes, supported assets, and order status.
- ⚑Staging and production keys are distinct and tied to different `environment` enums — using a staging key in `PRODUCTION` (or vice versa) silently shows the widget in 'invalid partner' mode.
- ⚑Some payment methods (UPI, PIX, SEPA Instant) are region-locked and won't appear unless the user's IP/KYC matches. Don't hard-code paymentMethod assumptions in the UI.
- ⚑Order webhooks fire on multiple statuses (`AWAITING_PAYMENT_FROM_USER`, `PROCESSING`, `COMPLETED`, `FAILED`) — credit the user only on `COMPLETED` and verify the webhook HMAC.
- ⚑Transak's KYC is sticky to the email; users who started KYC on another partner site may finish faster but you cannot resume mid-flow on your domain.
- ⚑Wallet network strings (`ethereum`, `polygon`, `arbitrum`, `solana`) are case-sensitive and must match Transak's enum exactly — fetch them from `/api/v2/currencies/crypto-currencies` rather than hard-coding.