iOS
The Transak iOS integration allows you to embed a fully functional interface directly into your native iOS application using Webview.
Add Camera Permission
Update your Info.plist to include camera permission (required for KYC verification):
Implement WebView in View Controller
Configure your View Controller to load the Transak widget URL using your preferred implementation:
Create Widget URL (using 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 to load Transak in iOS 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:
Use cases
Use the table below to choose the right approach for redirects, order data, and WebView events.
Deeplink
Transak supports deeplinking through the use of the redirectURL query parameter to enable seamless navigation after the purchase/sell process is completed.
Handle Deeplink and Parse Parameters
Listen for the deeplink and parse the returned parameters in your App
When Transak redirects back, it includes additional query parameters appended to deeplink URL mentioned here.
Pass redirectURL in Create Widget URL API
Call the Create Widget URL to generate a Widget URL by securely passing the widget parameters along with the redirectURL parameter.
The response returns a widgetUrl that should be used to load Transak in iOS 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:
Events
Transak allows listening of in-widget events (like order creation, completion, and widget close) through native event handlers in iOS WebViews.
Add a script message handler to your WebView using the handler name IosWebview to listen for all frontend events.