Platform Guides
The Hubble SDK can be integrated on any platform that supports a WebView or iframe. Choose your platform below.
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.
https://sdk.dev.myhubble.money/
?clientId=YOUR_CLIENT_ID
&appSecret=YOUR_APP_SECRET
&token=YOUR_SSO_TOKEN
&appVersion=1.0.0 // optional
&deviceId=device-abc // optional
| Parameter | Required | Description |
|---|---|---|
clientId | Required | Client ID provided by the Hubble team during onboarding |
appSecret | Required | App secret provided by the Hubble team (used for server-side config lookup) |
token | Required | SSO token for the current user, generated by your backend |
appVersion | Optional | App version string. Defaults to "10000". |
deviceId | Optional | Device identifier for analytics tracking. |
Choose Your Platform
| Platform | Integration Method | Guide |
|---|---|---|
| Web | iframe with postMessage events | Web Integration Guide |
| Android | WebView with JavaScript interface | Android Integration Guide |
| iOS | WKWebView with script message handler | iOS Integration Guide |
| React Native | react-native-webview with onMessage | React Native Integration Guide |
| Flutter | webview_flutter with JavascriptChannel | Flutter Integration Guide |
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:
| Event | Description | When to Handle |
|---|---|---|
app_ready | SDK has fully loaded and is ready for interaction | Hide loading spinners, log initialization |
close | User tapped the close/back button in the SDK | Close the WebView and return to your app |
error | An error occurred in the SDK | Log the error, optionally show a fallback UI |
If you do not handle the close event, users will be trapped in the SDK with no way to return to your app. This is the most common integration issue and causes a poor user experience.
Platform Identifiers
When integrating on native platforms, include the wrap-plt parameter to identify the platform:
| Platform | wrap-plt Value |
|---|---|
| Android | an |
| iOS | ios |
| React Native | rn |
| Flutter | flutter |
| Web | (not required) |