Deeplinks
How to open specific pages in the SDK directly.
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 appending the route path to your base URL before the query parameters.
Supported Routes
| Route | URL Path | Additional Query Params | Description |
|---|---|---|---|
| Home | / | — | Opens the default home page |
| Brand purchase | /buy/{brandId} | amount, coupon, skipToPayment, consumeCoins | Opens the voucher purchase page for a brand |
| Search | /search | category (optional) | Opens the search page or a specific category |
| Transactions | /transactions | showBackButton | Opens the transactions/redemption history |
| Coin Transactions | /coin-transactions | showBackButton | Opens the coin transactions history |
| Help | /help | — | Opens the help and support page |
URL Format
https://{baseUrl}/{route}?clientId={clientId}&appSecret={appSecret}&token={token}&wrap-plt={platform}Base URLs:
- Development:
https://sdk.dev.myhubble.money - Production:
https://sdk.myhubble.money
Examples
Open brand purchase page:
https://sdk.myhubble.money/buy/uber?clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutterOpen brand page with pre-filled amount:
https://sdk.myhubble.money/buy/uber?amount=500&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutterOpen brand page with coupon code:
https://sdk.myhubble.money/buy/starbucks?coupon=SAVE20&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutterOpen help page:
https://sdk.myhubble.money/help?clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutterSkip directly to payment with pre-filled amount:
https://sdk.myhubble.money/buy/uber?amount=500&skipToPayment=true&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutterOpen search with category:
https://sdk.myhubble.money/search?category=food&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutterBrand Purchase Query Parameters
The following query parameters can be used with the brand purchase route (/buy/{brandId}):
| Parameter | Type | Description |
|---|---|---|
amount | number | Pre-fills the purchase amount. Must be within the brand’s allowed min/max range. |
coupon | string | Applies a coupon code to the purchase. |
skipToPayment | boolean | When true, automatically proceeds to the payment step after the page loads. |
consumeCoins | boolean | When true, applies available coins balance towards the purchase. |
Implementation in Code
When initializing your WebView, construct the URL with the desired deeplink route:
JavaScript/TypeScript (React Native):
const baseUrl = "https://sdk.myhubble.money/";
const sourceUrl = `${baseUrl}buy/uber?clientId=${clientId}&appSecret=${appSecret}&token=${token}&wrap-plt=rn`;
// Use this URL to load your WebViewKotlin (Android):
val baseUrl = if (env == "prod") "sdk.myhubble.money" else "sdk.dev.myhubble.money"
val url = "https://$baseUrl/buy/uber?clientId=$clientId&appSecret=$appSecret&token=$token&wrap-plt=an"
webView.loadUrl(url)Swift (iOS):
var components = URLComponents(string: "https://sdk.myhubble.money/buy/uber")!components.queryItems = [ URLQueryItem(name: "clientId", value: clientId), URLQueryItem(name: "appSecret", value: appSecret), URLQueryItem(name: "token", value: token), URLQueryItem(name: "wrap-plt", value: "ios"),]
webview.load(URLRequest(url: components.url!))Dart (Flutter):
final baseUrl = 'https://sdk.myhubble.money/';// dev baseUrl is https://sdk.dev.myhubble.money/
final sourceUrl = '${baseUrl}buy/uber?clientId=$clientId&appSecret=$appSecret&token=$token&wrap-plt=flutter';
_controller.loadRequest(Uri.parse(sourceUrl));