🎉 Lailaolab Payment Support is service now. Get Start

v1
Connect to Subscription
Generate QR

1. Connect subscription Payment

1.1 Generate QR

To generate a QR code for the subscription payment, you can use the following code snippet: To make a payment through the Bank Platform, it is necessary to create a QR String for connecting the bank to use the Mobile Bank app to scan and make the connection.

URL: payment-gateway.lailaolab.com/v1/api/subscription/generate-bcel-qr

Method: POST

HAEDER: secretKey: PLATFORM_SECRET_KEY

1. Request body

FieldTypeDescription
maxAmountNumberNumber Max amount to be created for a transaction
subscriptionDateDateThe subscription date "YYYY-MM-DD"
resubscriptionDaysNumberNumber of days for resubscription (ex:30 for 30 days or amonth)
descriptionStringA description of the transaction or purpose

2. Example Generate code

const handleSubmit = async (e) => {
  e.preventDefault();
  setIsLoading(true);
  const payloadData = {
    maxAmount: 1000,
    subscriptionDate: '2025-02-12', // recommend to use the currently date
    resubscriptionDays: 30, // 30 days ,60 days,90 days,
    description: "This is test subscription",
  }
  Const config = {
    headers: {
      secretKey: SECRET_KEY, // Platform secret key
    },
  }
  try {
    const response = await axios.post(`${URL}`, payloadData, config);
    if (response.status === 200) {
      setIsLoading(false);
      console.log("Response", response?.data);
      setQrCode(response.data?.qrCode);
    }
  } catch (error) {
    console.error("Error", error);
    setIsLoading(false);
  }
}

3. Response data

FieldTypeDescription
messageStringMessage to tell that generate QR successfully
transactionIDStringUnique identifier for the transaction
qrCodeStringThe QR string of the transaction
linkStringDeep link to access to each bank's app

4. Example generate QR response data

application/json
{
"message": "SUCCESSFULLY",
"transactionId": "c1a286f3-c5f8-48fc-94a0-6ebb7a5489e8",
"qrCode":
"https://api.qrserver.com/v1/create-qr-code/?size=200x200&ecc=H&data=00020101021233
980004BCEL0118ONEPAYSUBSCRIPTION0216mch679ae2c0a187d0320SBDMQTGMVMSRUVQUZOLY0406RUL
E-5051083030620155204729953034185802LA624602102030-06-01050410000820TAITTJVQEKRJZZJ
UFMIR6304DABB","link":"onepay://qr/00020101021233980004BCEL0118ONEPAYSUBSCRIPTION0216mch679ae2c0a187d0320
SBDMQTGMVMSRUVQUZOLY0406RULE-5051083030620155204729953034185802LA624602102030-06-01
050410000820TAITTJVQEKRJZZJUFMIR6304DABB"
}
Read More:

Explore the full Subscription Payment for detailed integration guidelines .

Click here to access:

Subscription Payment Documentation (PDF)