Deep Linking
Guide for implementing deep linking in HitPay
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
- Amount: The amount to be paid.
- Currency: The currency in which the payment will be made.
- Description: A description of the payment or order.
- 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¤cy=SGD&description=Payment%20for%20order%201234&callback_url=https%3A%2F%2Fexample.com%2Fcallback
In this example:
amount
is set to100.00
.currency
is set toSGD
(Singapore Dollar).description
is set toPayment for order 1234
.callback_url
is set tohttps://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
- 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.
- Pre-fill Details: The Quick Sale screen will be pre-filled with the amount, currency, and description provided in the URL parameters.
- 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
Was this page helpful?