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 to generate a Widget URL by securely passing the widget parameters.
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
Supported Events
React Native WebView
For teams that prefer managing the WebView directly, you can use the react-native-webview library.
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 to generate a Widget URL by securely passing the widget parameters.
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: