React Native
The Transak React Native integration allows you to embed a fully functional interface directly into your React Native application.
Google Pay works only with the Transak React Native SDK integration for mobile applications.
Integration Methods
Transak React Native SDK (Recommended)
Official Transak SDK with built-in event handling, callbacks, and simplified camera permissions for both Expo and Non-Expo implementations.
Install SDK and Dependencies
Install the Transak SDK based on your project setup.
Without Expo
With Expo
Install the React Native SDK:
Install required peer dependencies:
Create a Widget URL (Backend Only)
Call the Create Widget URL API from your backend to generate a secure widget url using
The response returns a widgetUrl that should be used in the transakConfig prop.
A widgetUrl is valid for 5 minutes and can only be used once. A new widgetUrl must be generated for every user flow.
Example Request:
Component Props
React Native WebView
For teams that prefer managing the WebView directly, you can use the react-native-webview library.
Transak uses the default User-Agent to detect that the widget is running inside a native WebView, which determines the payment methods we offer. Replacing it strips those identifiers, so users may be shown methods that cannot complete in a WebView and our support team loses the signal needed to diagnose failures.
Keep the default User-Agent unchanged. If you need to identify your app, use your platform’s append-only option
Implement WebView Component
Import and render the WebView with the Transak widget URL:
These props should not be passed for Apple Pay to function properly.
sharedCookiesEnabledinjectedJavaScriptinjectedJavaScriptBeforeContentLoaded
Create a Widget URL (Backend Only)
Call the Create Widget URL API from your backend to generate a secure widget url using
The response returns a widgetUrl that should be used as the source URL in the WebView.
A widgetUrl is valid for 5 minutes and can only be used once. A new widgetUrl must be generated for every user flow.
Example Request: