Generate QR
To make a payment through the Bank Platform, it is necessary to create a QR String for connecting the bank to use the Mobile Banking app to make the connection. Currently, we can connect to 3 banks in Laos such as: BCEL, Joint Development Bank (JDB), Indochina Bank (IB). The way to connect to create a QR is as follows
Bank API URL
1. BANQUE POUR LE COMMERCE EXTERIEUR LAO PUBLIC (BCEL)
BCEL_URL
https://payment-gateway.lailaolab.com/v1/api/payment/generate-bcel-qr
2. Joint Development Bank (JDB)
JDB_URL
https://payment-gateway.lailaolab.com/v1/api/payment/generate-jdb-qr
3. Indochina Bank IB
IB_URL
https://payment-gateway.lailaolab.com/v1/api/payment/generate-ib-qr
How to use
Request
API Options | Details |
---|---|
method | POST |
url string | url of the service bank |
Header Parameters | Details |
---|---|
secretKey string | Your secretKey after being approved can be taken at Key Service |
Content-Type string | The media type of the resource being sent must be set to "application/json" |
Request Body | Details |
---|---|
amount integer | The amount of money in the transaction |
description string | Transaction's description |
nodejs
const axios = require('axios');
let data = JSON.stringify({
"amount": 1,
"description": "Example Description"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://payment-gateway.lailaolab.com/v1/api/payment/generate-bcel-qr',
headers: {
'secretKey': '$2b$10$sDS2Jf5EV2x5sf0hpWp1yeQTOFjbJ2IMfvhBv9lSiHM2uulNvSMTC',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
Key | Details |
---|---|
message string | The response message from API call |
transactionId string | The id of transaction |
qrCode string | The QR string of the transaction |
link string | Deeplink to access to each bank's app (IB: Can't access app) |
application/json
{
"message": "SUCCESSFULLY",
"transactionId": "8cc876b4-a4af-4886-81f1-3890453eb656",
"qrCode": "00020101021133730004BCEL0106ONEPAY0216mch6542c0373ede30314202403271909590513CLOSEWHENDONE53034185405100005803VTE6002LA625305368cc876b4-a4af-4886-81f1-3890453eb5560809Buy Pants630440FF",
"link": "onepay://qr/00020101021133730004BCEL0106ONEPAY7216mch6541c0373ede30314202403271909590513CLOSEWHENDONE53034185405100005803VTE6002LA625305368cc876b4-a4af-4886-81f1-3890453eb5560809Buy Pants630440FF"
}