Skip to main content

Integration

To integrate the Widget using a WebView on iOS and Android, you must use the following HTML:
The widget configuration needs to be passed through a querystring instead of using client side JavaScript.
Using React Native?Check our @fintoc/fintoc-react-native npm library to integrate the WebView to your application quickly!

How it works

When including the Fintoc WebView in your mobile application, you need to pass the following query params to configure it, depending on the product that you want to use:
Text
You can also include nested parameters in your query by using the following query string format:

Usage Example

Here are some snippets to get you started as quickly as humanly possible:
Notice that the Swift example has a webView method. This method defines what happens when a user clicks on a link inside the WebView. On the example, the link gets opened in Safari, but you can customize this behaviour at will (links could be opened inside the same application, for example). This is important because, when using the Payment Initiation product, after finishing the payment flow the user can click a link to download the transaction voucher. You should allow links to be opened.

WebView Redirections

Once the WebView is integrated, you can interact with its events using redirections.
onEvent (WebView)The onEvent event for WebView is disabled by default and can be enabled by passing the queryparam _on_event={any_value} as a parameter of https://webview.fintoc.com/widget.html (e.g.: https://webview.fintoc.com/widget.html?[...]&_on_event=true). Once enabled, it will be possible to receive onEvent events. Starting May 1st, 2023, this functionality will be enabled by default, so it is necessary to handle the onEvent redirection before this date to avoid breaking the integration with the Widget.
To use these methods on Android and iOS, you can use the following snippets:
iOS - adding fintocwidget URL SchemeBefore integrating the Fintoc widget with your iOS app, it’s important to add fintocwidget as a permitted URL scheme inside the app’s Info.plist file. This is required for security reasons.