Deeplinks
You may have a usecase where you want to open a brand page or some other page directly on SDK initialization.
This can be achieved by passing a page parameter during initialization as a URL query parameter.
Supported Pages
Currently, you can deeplink to the following pages:
| Page | Additional Params | Description | 
|---|---|---|
| brand | brandId,couponCode,amount | Opens the voucher edit modal | 
| brandDetails | brandId,couponCode,amount | Opens the voucher L2 page directly | 
| support | — | Opens the help and support page | 
| transactions | — | Opens the transactions/redemption history | 
| search | searchCategory(optional) | Opens the search page or a specific category | 
| bankTransfer | — | Opens the bank transfer details page | 
Note: The difference between
brandandbrandDetails:
brandopens the voucher edit modal page where users can select amount and quantity.
brandDetailsskips the modal and directly opens the voucher L2 details page.
Usage
Deeplinks are passed as URL query parameters when loading the Hubble WebView. Simply append the page parameter and any additional required parameters to your base URL.
URL Format
https://{baseUrl}/classic?clientId={clientId}&clientSecret={clientSecret}&token={token}&wrap-plt={platform}&page={pageName}&{additionalParams}Examples
Open brand page with voucher edit modal:
https://vouchers.dev.myhubble.money/classic?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=an&page=brand&brandId=uberOpen brand details page with pre-filled amount:
https://vouchers.dev.myhubble.money/classic?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=an&page=brandDetails&brandId=uber&amount=500Open brand page with coupon code:
https://vouchers.dev.myhubble.money/classic?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=an&page=brand&brandId=starbucks&couponCode=SAVE20Open support page:
https://vouchers.dev.myhubble.money/classic?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=an&page=supportOpen search with category:
https://vouchers.dev.myhubble.money/classic?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=an&page=search&searchCategory=foodImplementation in Code
When initializing your WebView, construct the URL with the desired deeplink parameters:
JavaScript/TypeScript (React Native):
const baseUrl = "https://vouchers.dev.myhubble.money/classic";
const sourceUrl = `${baseUrl}?clientId=${clientId}&clientSecret=${clientSecret}&token=${token}&page=brand&brandId=uber`;
// Use this URL to load your WebViewKotlin (Android):
val baseUrl = if (env == "prod") "vouchers.myhubble.money" else "vouchers.dev.myhubble.money"
val url = "https://$baseUrl/classic?clientId=$clientId&clientSecret=$clientSecret&token=$token&page=brand&brandId=uber"
webView.loadUrl(url)Swift (iOS):
let devUrl = URL(string: "https://vouchers.dev.myhubble.money/classic?clientId=\(clientId)&clientSecret=\(clientSecret)&token=\(token)&page=brand&brandId=uber")!let url = URL(string: "https://vouchers.myhubble.money/classic?clientId=\(clientId)&clientSecret=\(clientSecret)&token=\(token)&page=brand&brandId=uber")!
webview.load(URLRequest(url: env == "dev" ? devUrl : url))Dart (Flutter):
final baseUrl = 'https://vouchers.dev.myhubble.money/classic';// prod baseUrl is https://vouchers.myhubble.money/classic
final sourceUrl = '$baseUrl?clientId=$clientId&clientSecret=$clientSecret&token=$token&page=brand&brandId=uber';
_controller.loadRequest(Uri.parse(sourceUrl));Legacy: Android SDK (Deprecated)
If you’re using the deprecated Android SDK, you can pass deeplink parameters during initialization:
Hubble.init(    // ... other options    page = HubblePage(        page = "brand",        params = mapOf("brandId" to "uber")    )) 
 