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 | /sdk/gc/ | — | Opens the default home page |
| Brand purchase | /sdk/gc/buy/{brandId} | amount, couponCode | Opens the voucher purchase page for a brand |
| Search | /sdk/gc/search | category (optional) | Opens the search page or a specific category |
| Transactions | /sdk/gc/transactions | — | Opens the transactions/redemption history |
| Help | /sdk/gc/help | — | Opens the help and support page |
URL Format
https://{baseUrl}/sdk/gc/{route}?clientId={clientId}&clientSecret={clientSecret}&token={token}&wrap-plt={platform}Base URLs:
- Development:
https://vouchers.dev.myhubble.money - Production:
https://vouchers.myhubble.money
Examples
Open brand purchase page:
https://vouchers.myhubble.money/sdk/gc/buy/uber?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=flutterOpen brand page with pre-filled amount:
https://vouchers.myhubble.money/sdk/gc/buy/uber?amount=500&clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=flutterOpen brand page with coupon code:
https://vouchers.myhubble.money/sdk/gc/buy/starbucks?couponCode=SAVE20&clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=flutterOpen help page:
https://vouchers.myhubble.money/sdk/gc/help?clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=flutterOpen search with category:
https://vouchers.myhubble.money/sdk/gc/search?category=food&clientId=your_client_id&clientSecret=your_client_secret&token=user_token&wrap-plt=flutterImplementation in Code
When initializing your WebView, construct the URL with the desired deeplink route:
JavaScript/TypeScript (React Native):
const baseUrl = "https://vouchers.myhubble.money/sdk/gc/";
const sourceUrl = `${baseUrl}buy/uber?clientId=${clientId}&clientSecret=${clientSecret}&token=${token}&wrap-plt=rn`;
// 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/sdk/gc/buy/uber?clientId=$clientId&clientSecret=$clientSecret&token=$token&wrap-plt=an"
webView.loadUrl(url)Swift (iOS):
var components = URLComponents(string: "https://vouchers.myhubble.money/sdk/gc/buy/uber")!components.queryItems = [ URLQueryItem(name: "clientId", value: clientId), URLQueryItem(name: "clientSecret", value: clientSecret), URLQueryItem(name: "token", value: token), URLQueryItem(name: "wrap-plt", value: "ios"),]
webview.load(URLRequest(url: components.url!))Dart (Flutter):
final baseUrl = 'https://vouchers.myhubble.money/sdk/gc/';// dev baseUrl is https://vouchers.dev.myhubble.money/sdk/gc/
final sourceUrl = '${baseUrl}buy/uber?clientId=$clientId&clientSecret=$clientSecret&token=$token&wrap-plt=flutter';
_controller.loadRequest(Uri.parse(sourceUrl));