External Web Links

For banking flows, you will need to open external links using native platform APIs:

 private fun openExternalLink(url: String) {
        try {
            val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
            startActivity(intent)
        } catch (e: Exception) {
            Log.e("DashboardFragment", "Error opening external link", e)
        }
    }

The widget will pass you an event with the type: externalLink if the user has selected to connect to a bank.

When the user returns from the bank, they will be redirected via our servers to a universal link/app link that triggers your app.

You will need to retrieve the hash fragment from that link and pass it into the webivew:

 // Retrieve the fragment from the arguments
  val fragment = arguments?.getString("fragment")

  val widgetId = "your-widget-id"
  val token = "token-for-user"

  Log.d("DashboardFragment", "URL fragment received: $fragment")

  // Load the WebView with the received parameters
  val url = "$WIDGET_URI?widget_id=$widgetId&token=$token#$fragment"
  webView.loadUrl(url)