Skip to content

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

RouteURL PathAdditional Query ParamsDescription
Home/sdk/gc/Opens the default home page
Brand purchase/sdk/gc/buy/{brandId}amount, coupon, skipToPayment, consumeCoinsOpens the voucher purchase page for a brand
Search/sdk/gc/searchcategory (optional)Opens the search page or a specific category
Transactions/sdk/gc/transactionsshowBackButtonOpens the transactions/redemption history
Coin Transactions/sdk/gc/coin-transactionsshowBackButtonOpens the coin transactions history
Help/sdk/gc/helpOpens the help and support page

URL Format

https://{baseUrl}/sdk/gc/{route}?clientId={clientId}&appSecret={appSecret}&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&appSecret=your_app_secret&token=user_token&wrap-plt=flutter

Open brand page with pre-filled amount:

https://vouchers.myhubble.money/sdk/gc/buy/uber?amount=500&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutter

Open brand page with coupon code:

https://vouchers.myhubble.money/sdk/gc/buy/starbucks?coupon=SAVE20&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutter

Open help page:

https://vouchers.myhubble.money/sdk/gc/help?clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutter

Skip directly to payment with pre-filled amount:

https://vouchers.myhubble.money/sdk/gc/buy/uber?amount=500&skipToPayment=true&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutter

Open search with category:

https://vouchers.myhubble.money/sdk/gc/search?category=food&clientId=your_client_id&appSecret=your_app_secret&token=user_token&wrap-plt=flutter

Brand Purchase Query Parameters

The following query parameters can be used with the brand purchase route (/sdk/gc/buy/{brandId}):

ParameterTypeDescription
amountnumberPre-fills the purchase amount. Must be within the brand’s allowed min/max range.
couponstringApplies a coupon code to the purchase.
skipToPaymentbooleanWhen true, automatically proceeds to the payment step after the page loads.
consumeCoinsbooleanWhen 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://vouchers.myhubble.money/sdk/gc/";
const sourceUrl = `${baseUrl}buy/uber?clientId=${clientId}&appSecret=${appSecret}&token=${token}&wrap-plt=rn`;
// 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/sdk/gc/buy/uber?clientId=$clientId&appSecret=$appSecret&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: "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://vouchers.myhubble.money/sdk/gc/';
// dev baseUrl is https://vouchers.dev.myhubble.money/sdk/gc/
final sourceUrl = '${baseUrl}buy/uber?clientId=$clientId&appSecret=$appSecret&token=$token&wrap-plt=flutter';
_controller.loadRequest(Uri.parse(sourceUrl));