🎉 PhaJay is service now. Get Started

v1
Connect to Payment Link

Payment Link

1. Payment Link Integration Flow – Customer Platform

This flow describes how a customer-facing platform (e.g., e-commerce site, mobile app, or SaaS product) can integrate with the Payment Link service to facilitate seamless online payments via local banks or other supported payment channels. (who connect with Payment Link)

Overvew image

2. Configure Redirect URLs and Webhook

First of all,it required configuring the Success URL , cancel URL,and Webhook in the PhayJay Portal

Step 1:

Configure Redirect URLs

  • Login to the portal system (portal.phapay.com)

  • Navigate to Setings > Callback URL Setting

    webhook image
  • Fill in the following fields:

    Type                      Description
    Success URLThe URL where users are redirected after a successful payment (e.g., your platform’s thank-you page).
    Cancel URLThe URL where users are redirected if they cancel the payment.
    webhook-url image
Step 2:

config Webhook API

    To receive payment status updates from PhaPay, you need to configure the Webhook URL.

    1. Navigate to:
      Settings > Webhook Setting

    2. In the form, fill in the following fields:

    Field                      Description
    EndpointThe publicly accessible URL on your server where you want to receive payment notifications (e.g., https://yourdomain.com/api/payment/webhook (opens in a new tab)).
    Description (optional)Add a short description to identify the purpose of this Webhook, such as Production Order Payment Webhook.
    webhook-url image

3. Get Payment Link

To make a payment with Payment Link through the Bank Platform, it is necessary to create a Link for connecting the bank to use the Mobile Banking App to make the connection. Currently, we can connected to 4 banks in laos such as :

Short Name       Bank Name
BCELBanque pour le Commerce Extérieur Lao
JDBJoint Development Bank
LDBLao Development Bank
IBIndochina Bank

The process to connect and retrieve a Payment Link is as follows:

ParameterValue
URLhttps://payment-gateway.lailaolab.com/v1/api/link/payment-link
MethodPOST
AuthenticationBasic Auth

Example:

application/json
      {
      "Content-Type": "application/json",
      Authorization:`Basic ${Buffer.from(`${KEY}`).toString("base64")}`
     }
Note: KEY refers to your Secret Key, which is used to authorize API requests. You can find your Secret Key on the Home page of the PhaPay Portal after logging in.

3.1 Request Body

When creating a Payment Link, send a POST request with the following JSON payload: :
FieldTypeRequiredDescription
orderNoStringNo (New Update)We recommend you use this field and it must be unique
amountNumberYesThe amount to be paid for the transaction.
descriptionStringYespayment description's purpose
tag1StringNoCustom field #1 for your internal reference.
tag2StringNoCustom field #2 for your internal reference.
tag3StringNoCustom field #3 for your internal reference.
💡 Tip for Developers: tag1, tag2, and tag3 can be used to pass metadata such as order ID, user ID, or tracking references — they will be returned in webhook callbacks.

Example:
application/json
{ 
  orderNo: "ORDER1757665596722" // orderNo 
  amount: 1
  description: "Buy a product"
  tag1: "6868a691f914536d6d731e2b" // shopId
  tag2: "BB SHOP"                  // shopName
  }

3.2 Response Data

FieldTypeDescription
messageStringA message indicating the result of the API call (e.g., "SUCCESSFULLY" or error info).
redirectURLStringThe generated Payment Link URL. Redirect the customer to this URL to complete the payment process.
Example:
application/json
{
  "message": "SUCCESSFULLY",
  "redirectURL": "https://payment-link.lailaolab.com?amount=1&linkCode=bd631c81-5243-4711-9bf9-8630f2103e77",
   "orderNo": "ORDER1757665857427"
}

3.3 Redirect to Payment Link

Once the Payment Link is successfully generated, your application should redirect the user to the provided secure payment page.


Step 1:
After receiving the redirect link, open it to navigate to the payment page.

payment-link

Step 2:
When the user selects their bank, they will be automatically redirected to the QR code page.
On this page, the user can either:

  • Open their bank app via App Link, or
  • Scan the QR code to complete the payment.
payment-link-qr

Step 3:
After scanning and completing the payment, the system will display a confirmation message for 60 seconds (the user can skip this step by clicking).
Then, it will automatically redirect the user to their success callback URL.

Example Redirect URL

application/json
{
  Your_website_success_URL?linkCode=1d180ad6-efca-49c5-be71-80b2e2095414&amount=1&description=Buy%20a%20product&orderNo=ORDER1757666411760
}

URL Parameters Breakdown

ParameterExample ValueDescription
linkCode1d180ad6-efca-49c5-be71-80b2e2095414Unique payment link identifier
amount1Payment amount
descriptionBuy a productURL-encoded payment description
orderNoORDER1757666411760Platform's orderNo / transaction ID

payment-link-success

3.4 Webhook Callback Data

Once the transaction is complete, PhaJay will send callback data to the designated webhook URL provided during the configuration. This data is sent as part of an HTTPS request (typically a POST) to your webhook URL.

Webhook Response Data

FieldTypeDescription
messageStringStatus message of the transaction response.
refNoNumberReference number for the transaction.
billNumberStringUnique identifier for the bill.
txnDateTimeString (Date)Date and time of the payment.
txnAmountNumberTransaction amount.
sourceCurrencyStringCurrency of the transaction source.
sourceAccountStringAccount number of the source.
merchantNameStringName of the merchant involved in the transaction.
sourceNameStringName of the person or entity initiating the transaction.
descriptionStringDescription or purpose of the transaction.
exReferenceNoStringExternal reference number for the transaction.
userIdStringUser identifier in the PhaJay system.
linkCodeStringUser Unique payment link identifier
transactionIdStringUnique identifier for the transaction.
statusStringCurrent status of the transaction.
paymentMethodStringPayment method used (e.g., BCEL, JDB, ...).
orderNoStringPlatform's order number.
successURLString (URL)Success callback URL.
tag1StringAdditional tag or note related to the transaction.
tag2StringAdditional tag or note related to the transaction.
tag3StringAdditional tag or note related to the transaction.
tag4StringAdditional tag or note related to the transaction.
tag5StringAdditional tag or note related to the transaction.
tag6StringAdditional tag or note related to the transaction.

Exmaple Response data

application/json
{
"message": "SUCCESS",
"refNo": "001LNMI395488650608",
"exReferenceNo": "BONEPBNOAIWN6AFO",
"merchantName": "PhaJay Payment",
"memo": "LMPS QR PAYMENT|LNMI|BCEL|1600120000000006170001|LAK|PhaJay Payment|ZAzprpRJomfSW0dofOUC0GwcI|PAYMENT|15:59:50",
"txnDateTime": "2025-09-12 15:59:50",
"txnAmount": 1,
"billNumber": "ZAzprpRJomfSW0dofOUC0GwcI",
"sourceAccount": "138880037",
"sourceName": "JDB Yes for Domistrict Bank LAP NET ",
"sourceCurrency": "LAK",
"paymentId": "68c3dc6c464ee95aafeb9319",
"linkCode": "1d180ad6-efca-49c5-be71-80b2e2095414",
"transactionId": "1d180ad6-efca-49c5-be71-80b2e2095414",
"paymentMethod": "JDB",
"status": "PAYMENT_COMPLETED",
"description": "Buy a product",
"remark": "",
"tag1": "6868a691f914536d6d731e63",
"tag2": "BB SHOP",
"tag3": "",
"tag4": "",
"tag5": "",
"tag6": "",
"userId": "66923e41ea9468588820b046",
"orderNo": "ORDER1757666411760",
"successURL": "http://localhost:5174/payment/success?linkCode=1d180ad6-efca-49c5-be71-80b2e2095414&amount=1&description=Buy a product&orderNo=ORDER1757666411760"
}

⚠️ 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).
  • linkCode → User Unique payment link identifier generated by the system.
  • transactionId → Unique transaction identifier generated by the system.
  • orderNo → Platform's order number associated with the transaction.
  • txnAmount → The paid amount.

All other fields may vary by bank and should be handled accordingly.