Deep Linking Guide for HitPay

Overview

Deep linking allows users to open the HitPay app directly from other merchant-facing apps, facilitating seamless payment experiences. This guide provides an overview of deep linking, its use cases, implementation details, and frequently asked questions.

Use Case

Users of other merchant-facing apps need to manually open the HitPay app to initiate payments. Deep linking streamlines this process by allowing developers to integrate a direct link to the HitPay app. This enables users to initiate payments directly within HitPay without manually switching between apps.

Deep Linking Implementation

URL Scheme

The URL scheme for opening the HitPay app is: hitpay://quick_sale

Parameters to Include

  1. Amount: The amount to be paid.
  2. Currency: The currency in which the payment will be made.
  3. Description: A description of the payment or order.
  4. Callback URL: The URL to which the user should be redirected after the payment is completed.

Example URL

Here is an example of a URL scheme that other apps can use to open the HitPay app and initiate a payment:

hitpay://quick_sale?amount=100.00&currency=SGD&description=Payment%20for%20order%201234&callback_url=https%3A%2F%2Fexample.com%2Fcallback

In this example:

  • amount is set to 100.00.
  • currency is set to SGD (Singapore Dollar).
  • description is set to Payment for order 1234.
  • callback_url is set to https://example.com/callback.

Developers can use this URL scheme to integrate HitPay into their apps, allowing users to seamlessly initiate payments without manually opening the HitPay app.

Implementation Steps

  1. Quick Sale Integration: The deep linking is implemented only for the Quick Sale feature. If the user is on another screen, the app will navigate back to the home screen and trigger the Quick Sale flow.
  2. Pre-fill Details: The Quick Sale screen will be pre-filled with the amount, currency, and description provided in the URL parameters.
  3. Callback URL Handling: The callback URL is stored in memory for one transaction. Once the payment is completed, the app will display the success screen, wait for 2 seconds, and then open the callback URL in an external browser.

Limitations

  • User Authentication: This deep linking feature only works if the user is already logged in to the HitPay app.
  • Quick Sale Only: The deep linking functionality is currently applicable only to the Quick Sale feature.

FAQs