🎉 Lailaolab Payment Support is service now. Get Start

v1
Connect to Payment QR
Subscription

Payment Subscription

To receive the payment information when there is the payment transaction, the platform must subscribe to the Payment Support, which must be connected in the SocketIO format according to the link and must subscribe to the event as below:

  • url for check the subscription
https://payment-Support.lailaolab.com/?key=<PAYMENT_Support_SECRET>

Request

ParametersTypeDescription
urlStringThe link used to track transactions by viewing the details each time. Must have a key with the same value as your SecretKey URL.
<PAYMENT_Support_SECRET>StringYour SecretKey can be obtained from lailao payment Support portal (opens in a new tab).
join::<PAYMENT_Support_SECRET>StringYour SecretKey can be obtained from lailao payment Support portal (opens in a new tab).

Code Example

Nodejs-socketio
const onSubscribePaymentSupport = (models) => {
    try {
        const _socketPaymentUrl = "https://payment-Support.lailaolab.com/?key=" + process.env.PAYMENT_Support_SECRET
        const socket = io(_socketPaymentUrl);
 
        if (socket.connected) {
        console.log('Socket is already connected.');
        return; // No need to connect again
        }
        // Connect to the server
        socket.on('connect', () => {
        console.log('Connected to the payment Support server!');
        // Subscribe to a custom event
        socket.on('join::' + process.env.PAYMENT_Support_SECRET, async (data) => {
            console.log('Data received:', data);
        });
        });
        // Handle the connection error (optional)
        socket.on('connect_error', (error) => {
        console.error('Connection failed:', error);
        });
        return;
    } catch (error) {
        console.log({ error })
    }
}

Response

FieldTypeDescription
messageStringThe response message of API call.
refNoStringThe reference number assigned to the transaction.
exReferenceNoStringAn external reference number associated with the transaction.
merchantNameStringThe name of the merchant involved in the transaction.
memoStringA brief description of the transaction, e.g., 'PAYMENT'.
txnDateTimeStringThe date and time when the transaction was processed, in the format YYYY-MM-DD HH:MM:SS.
txnAmountIntegerThe amount that was transacted.
billNumberStringA unique bill number associated with the transaction.
sourceAccountStringThe account number from which the funds were sourced.
sourceNameStringThe name associated with the source account (may be empty).
sourceCurrencyStringThe currency of transaction.
userIdObjectA unique identifier for the user who initiated the transaction.
statusStringThe current status of the transaction.
transactionIdStringA unique identifier for the transaction, not repeat.

The Response

application/json
{
    "message": 'SUCCESS',
    "refNo": '001LNMI811581649255',
    "exReferenceNo": 'BONEN5JL999C3ZLN',
    "merchantName": 'LAILAOLAB ICT SOLUTIONS CO.,LTD',
    "memo": 'PAYMENT',
    "txnDateTime": '2024-03-28 22:30:50',
    "txnAmount": 100000,
    "billNumber": 'VobAkGl0gVKrVecIbo2ogYrIk',
    "sourceAccount": '1600120000000004810001',
    "sourceName": '',
    "sourceCurrency": 'LAK',
    "userId": new ObjectId("656fd8886b411beab18eca79"),
    "status": 'PAYMENT_COMPLETED',
    "transactionId": 'VobAkGl0gVKrVecIbo2ogYrIk'
}

Read More:

Explore the full Payment QR documentation for detailed integration guidelines .

Click here to access:

Payment QR Documentation (PDF)