Skip to main content

Platform Guides

Now that authentication is set up and you can generate SSO tokens for your users, it is time to embed the Hubble SDK into your application.

Understanding the SDK URL

The Hubble SDK is a hosted web application. You integrate it by loading a URL with your credentials and the user's SSO token. Here is the URL structure:

https://sdk.dev.myhubble.money/
?clientId=YOUR_CLIENT_ID
&appSecret=YOUR_APP_SECRET
&token=YOUR_SSO_TOKEN
ParameterRequiredDescription
clientIdRequiredClient ID provided by the Hubble team during onboarding
appSecretRequiredApp secret provided by the Hubble team (used for server-side config lookup)
tokenRequiredSSO token for the current user
appVersionOptionalApp version string. Defaults to "10000".
deviceIdOptionalDevice identifier for analytics tracking.

The token parameter must be a valid SSO token generated by your backend for the current user.

Choose Your Platform

The Hubble SDK can be integrated on any platform. Choose the platform that matches your application and follow the corresponding integration guide:

PlatformIntegration MethodGuide
Webiframe with postMessage eventsWeb Integration Guide
AndroidWebView with JavaScript interfaceAndroid Integration Guide
iOSWKWebView with script message handleriOS Integration Guide
React Nativereact-native-webview with onMessageReact Native Integration Guide
Flutterwebview_flutter with JavaScript channelFlutter Integration Guide

Each platform guide covers the six integration steps in detail:

  • Setup the WebView - configure the WebView or iframe with the required settings.
  • Initialization - build the SDK URL with your credentials and platform parameter.
  • Load the WebView - load the URL and register event handlers.
  • Handling Navigation - keep Hubble and payment URLs in the WebView, open other URLs externally, and implement back navigation.
  • Handling Events - listen for action events (app_ready, close, error) and analytics events.
  • Payment Configuration - platform-specific UPI and card payment setup.
iOS: Use WKWebView Only

When integrating on iOS, you must use WKWebView. Do not use SFSafariViewController - it causes Hubble's fraud detection to fail, blocking transactions.

SDK Events Overview

The SDK communicates with your app through JavaScript messages (events). All platforms receive the same event types, but the mechanism differs. Action events control the SDK lifecycle:

ActionWhen It FiresWhat You Should Do
app_readySDK has finished loadingShow the WebView / iframe. Hide your loading spinner.
closeUser tapped close or back button in the SDKDismiss the WebView / iframe. Navigate the user back.
errorSDK failed to loadHide the WebView. Show a user-friendly error with retry.
Always Handle the close Event

The close action is the only way the SDK tells your application that the user wants to leave. If you do not handle it, the user will be stuck inside the SDK with no way to navigate back. This is the most common integration issue reported by partners.

Next Steps