Payment Link Sandbox
1. Introduction
The Payment Link Sandbox is a testing environment designed to allow developers to simulate payment link transactions without processing real money. This system enables testing of payment link creation, simulated payment flow, and real-time transaction status tracking to ensure that the integration functions correctly before going live.
1.1 What is the Payment Link Sandbox?
The Payment Link Sandbox is a payment using the Payment Link Sandbox through the Bank Platform, it is necessary to generate a link that redirects the user to their bank's Mobile Banking App to complete the payment. Currently, the system supports connections with four major banks in Laos, including:
Short Name | Bank Name |
---|---|
BCEL | Banque pour le Commerce Extérieur Lao |
JDB | Joint Development Bank |
LDB | Lao Development Bank |
IB | Indochina Bank |
The process to connect and retrieve a Payment Link sandbox is follow :
Parameter | Value |
---|---|
URL | https://payment-gateway.lailaolab.com/v1/api/test/payment/ge-payment-link (opens in a new tab) |
Method | POST |
Authentication | Basic Auth |
export async function POST(request) {
try {
const { amount, description } = await request.json();
const key =
process.env.SECRET_KEY ||
"Secret Key";
const data = JSON.stringify({
amount: amount || 1,
description: description || "Example Description",
});
const config = {
method: "post",
maxBodyLength: Infinity,
url: "https://payment-gateway.lailaolab.com/v1/api/test/payment/get-payment-link",
headers: {
Authorization: `Basic ${Buffer.from(key).toString("base64")}`,
"Content-Type": "application/json",
},
data: data,
};
const response = await axios.request(config);
console.log("data", response.data);
// console.log("res" , response);
return NextResponse.json(response.data);
} catch (error) {
console.error("Payment generation error:", error);
return NextResponse.json(
{ message: "Payment generation failed", error: error.message },
{ status: 500 }
);
}
}
Not :refers to your Secret Key, which is used to authorize API requests. You can find your Secret Key on the Home page of the PhaJay Portal after logging in.
1.2 Request Body
When creating a Payment Link Sandbox , send a POST request with the following JSON payload:
Field | Type | Description |
---|---|---|
amount | Number | The amount of transaction |
description | String | A description of the transaction or purpose |
tag1 | string | The first custom field of platform (option) |
tag2 | string | The second custom field of platform (option) |
tag1, tag2 can be used to pass custom metadata such as order ID, user ID, or tracking references. These values will be returned in webhook callbacks, making it easier to match transactions with your internal system.
{
"amount": 50000,
"description":"Sandbox test",
"tag1": "AppZap Shop",
"tag2": "666bbb461732a2e46233fdf9",
}
1.3 Response Data
Field | Type | Description |
---|---|---|
message | String | A string indicating the outcome of the API call |
redirectURL | String | Payment link page URL using for the payment process |
{
"message": "SUCCESS",
"redirectURL" :"https://payment-link-sandbox.netlify.app?amount=5000&linkCode=4MNBOBGS2MZB"
}
1.4 Redirect to Payment Link SandBox
In this step, the user will be redirected to a secure payment link sandbox page to select bank and complete the payment process
Set1 : It redirects to payment link sandbox for bank selection

Set2 : When the user selects their bank, they will be automatically redirected to the QR code page for payment in this page user can open PhayJay App to Scan QR for payment
Not :PhayJap App is a testing application developed by PhaJay to help you simulate transactions without using real money. You can use this app to scan QR codes generated in the sandbox environment for testing purposes.
The app is available for download on your mobile device via the following link:
Download PhayJap App
Set3 : After scanning and completing the payment, the system will display a message for 5 seconds Then, it will automatically redirect the user to their success callback URL

2. Webhook Callback Data
When the transaction is complete it will return callback data to the user's webhook This data is sent as part of the HTTPS request (usually a POST) from the service to your designated webhook URL.
Field | Type | Description |
---|---|---|
message | String | Status message of the response |
_id | String | A string containing the QR code data |
linkCode | String | Unique identifier for the payment document. |
amount | number | The account number initiating the transaction |
currency | String | Currency code (e.g., LAK) |
descriptione | String | A description of the transaction or purpose |
status | String | Payment status(e.g.,PAYMENT_COMPLETED) |
user | String | ID of the user in the PhaJay system |
tag1 to tag6 | String | An optional custom tag field for internal use |
isMerchantIdPayment | Boolean | Indicates if the payment was made via merchant ID |
isAffiliatePayment | Boolean | Indicates if the payment was made via an affiliate |
createdAt | String (ISO Date) | Date and time when the payment was created |
updateAt | String (ISO Date) | Date and time when the payment was updateAt |
origin | String | The method of payment (e.g., BCEL, JDB, LDB, IB) |
transactionId | String | Unique transaction identifier |
qrCode | String | QR code data string for scanning and paying |
closedBy | String | Indicates who closed the transaction (e.g., CUSTOMER) |
paymentData | String | Detailed metadata about the payment in stringified JSON |
paymentTime | String (ISO Date) | Actual time of payment transaction |
Explore the full Payment Link Sandbox documentation for detailed integration guidelines .
Click here to access:
Payment Link Sandbox Documentation (PDF)