Deeplink
Deeplink (short for mobile deep link) is a mobile technology that functions similarly to a website URL. It enables navigation from a mobile app (or a website) to a financial application that the customer wants to use for making a payment. After the payment is completed, the deep link redirects the customer back to your application.
Steps to integrate Deeplink
Below are the steps to integrate Deep Link into your product:
-
Retrieve the list of supported financial apps that offer Deep Link functionality via the endpoint /deeplink/apps
-
Generate a deeplinkUrl for the payment based on the recipient's information and the selected financial app. See details.
-
Open the deeplinkUrl returned from the API for your customer.
-
The financial app will launch and the payment information will be automatically filled in (for apps with autofill=1).
-
Once the payment is successful, the financial app will either automatically redirect or provide a button to navigate back to your application (for apps with autofill=1).
Call API
Get list of financial applications that support deeplink
- CURL
- Javascript (Axios)
curl --location 'https://sandbox.bankhub.dev/deeplink/apps' \
--header 'X-BankHub-Api-Version: 2023-01-01' \
--header 'x-client-id: <CLIENT_ID_HERE>' \
--header 'x-secret-key: <SECRET_KEY_HERE>' \
--header 'Content-Type: application/json' \
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://sandbox.bankhub.dev/deeplink/apps',
headers: {
'Accept': 'application/json',
'x-client-id': '<x-client-id>',
'x-secret-key': '<x-client-id>'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
For detail API, here
Create a payment deeplink
- CURL
- Javascript (Axios)
curl --location 'https://sandbox.bankhub.dev/deeplink' \
--header 'X-BankHub-Api-Version: 2023-01-01' \
--header 'x-client-id: <CLIENT_ID_HERE>' \
--header 'x-secret-key: <SECRET_KEY_HERE>' \
--header 'Content-Type: application/json' \
--data '{
"app": "ocb",
"payeeAddress": "113366668888@icb",
"payeeName": "NGUYEN VAN A",
"amount": 1000,
"transactionNote": "BH433423 test",
"redirectUrl": "loathanhtoan://"
}'
const axios = require('axios');
let data = JSON.stringify({
"app": "ocb",
"payeeAddress": "113366668888@icb",
"payeeName": "NGUYEN VAN A",
"amount": 1000,
"transactionNote": "BH433423 test",
"redirectUrl": "loathanhtoan://"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://sandbox.bankhub.dev/deeplink',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-client-id': '<x-client-id>',
'x-secret-key': '<x-client-id>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
For detail API, here