Payment Callback
PhaJay provides two methods for receiving payment callback data after a transaction is completed successfully.
1. Subscribe (Realtime via SocketIO)
To receive the payment information when there is the payment transaction, the platform must subscribe to the Payment, 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
| Parameters | Type | Description |
|---|---|---|
| url | String | The 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> | String | Your SecretKey can be obtained from PhaJay Payemnt Support portal (opens in a new tab). |
join::<PAYMENT_Support_SECRET> | String | Your SecretKey can be obtained from PhaJay Payemnt Support portal (opens in a new tab). |
Code Example
const onSubscribePaymentSupport = (models) => {
try {
const _socketPaymentUrl = "https://payment-gateway.lailaolab.com"
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.SECRET_KEY, async (data) => { // SECRET_KEY taken from to PhaJay Portal
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 })
}
}2. Webhook Callback (New Method)
To receive payment information automatically when a transaction is completed, you need to set your Webhook URL in the PhaJay portal by going to Settings > Webhook (see image below).

The payment server will send a callback response to your configured URL with the transaction details.
- Endpoint URL: The URL where payment notifications will be sent, e.g.
https://yourdomain.com/payment. - Description: A note or label for your webhook (optional, for your own reference).
When a payment is completed successfully, the system will Response the transaction payload to your webhook endpoint in JSON format.
Response Data
| Field | Type | Description |
|---|---|---|
| message | String | The response message of API call. |
| refNo | String | The reference number assigned to the transaction. |
| exReferenceNo | String | An external reference number associated with the transaction. |
| merchantName | String | The name of the merchant involved in the transaction. |
| description | String | Description about the transaction (custom text provided by merchant). |
| paymentMethod | String | The payment method used for the transaction (e.g., BCEL, OnePay). |
| txnDateTime | String | The date and time when the transaction was processed. Format: DD/MM/YYYY HH:mm:ss. |
| txnAmount | Integer | The amount that was transacted. |
| billNumber | String | A unique bill number associated with the transaction. |
| sourceAccount | String | The account number from which the funds were sourced. |
| sourceName | String | The name associated with the source account. |
| sourceCurrency | String | The currency of the transaction. |
| userId | String | A unique identifier for the user who initiated the transaction. |
| status | String | The current status of the transaction (e.g., PAYMENT_COMPLETED). |
| transactionId | String | A unique identifier for the transaction, not repeatable. |
| tag1–tag6 | String | Optional custom fields for additional tagging (empty if not used). |
Response Data Example
{
"billNumber": "81f8b0a6-9277-45e5-a6d2-8c1bd248bedf",
"description": "short is good",
"exReferenceNo": "YQ75K0RG6AXG",
"merchantName": "Lailao Payment",
"message": "SUCCESS",
"paymentMethod": "BCEL",
"refNo": 580960503,
"sourceAccount": "202509232428318",
"sourceCurrency": "LAK",
"sourceName": "ເຢີກື ເຊ່ຍເຊີ",
"status": "PAYMENT_COMPLETED",
"tag1": "",
"tag2": "",
"tag3": "",
"tag4": "",
"tag5": "",
"tag6": "",
"transactionId": "81f8b0a6-9277-45e5-a6d2-8c1bd248bedf",
"txnAmount": 1,
"txnDateTime": "23/09/2025 11:37:55",
"userId": "683ae8e8912ff3f68e2faa78"
}⚠️ Note:
Each bank may return different response fields.
However, the following system-standard fields are always guaranteed:
paymentMethod→ The bank/payment method used (e.g., BCEL, JDB,LDB).transactionId→ Unique transaction identifier generated by the system.txnAmount→ The paid amount.
All other fields may vary by bank and should be handled accordingly.