Skip to content

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:

PageAdditional ParamsDescription
brandbrandId, couponCode, amountOpens the voucher edit modal
brandDetailsbrandId, couponCode, amountOpens the voucher L2 page directly
supportOpens the help and support page
transactionsOpens the transactions/redemption history
searchsearchCategory (optional)Opens the search page or a specific category
bankTransferOpens the bank transfer details page

Note: The difference between brand and brandDetails:

  • brand opens the voucher edit modal page where users can select amount and quantity.
  • brandDetails skips 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=uber

Open 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=500

Open 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=SAVE20

Open support page:

https://vouchers.dev.myhubble.money/classic?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=an&page=support

Open 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=food

Implementation 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 WebView

Kotlin (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")
)
)