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: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
.
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
What if the user is not logged in to the HitPay app?
What if the user is not logged in to the HitPay app?
The deep linking feature will only work if the user is already logged in. If the user is not logged in, they will need to log in manually before the payment process can proceed.
Can deep linking be used for other features besides Quick Sale?
Can deep linking be used for other features besides Quick Sale?
Currently, the deep linking functionality is only implemented for the Quick Sale feature.
What happens after the payment is completed?
What happens after the payment is completed?
After the payment is completed, the app will show the success screen. On click of “Done” HitPay will open the callback URL in an external browser.