🎉 PhaPay 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

Before initiating payment transactions, you must configure the Success URL, Cancel URL, and Webhook (Callback URL) in the PhaPay Portal. This ensures users are redirected correctly and your system receives payment notifications.

Step 1:

Configure Redirect URLs

  • Login to the portal system (portal.lailaolab.la)

  • Navigate to Setings > Callback URL Setting

    webhook image
  • Fill in the following fields:

    Success URL: The URL where users are redirected after a successful payment (e.g., your platform’s thank-you page).

    Cancel URL: The URL where users are redirected if they cancel the payment.

    webhook-url image
Step 2:

config Webhook API

  • Go to Settings > Webhook Setting

  • In the form, fill in the following:

    Endpoint URL: The 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 :

  1. Banque pour le Commerce Extérieur Lao (BCEL)
  2. Joint Development Bank (JDB)
  3. Lao Development Bank (LDB)
  4. Indochina Bank (IB)

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

Method :

POST

Authentication :

Basic 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:
FieldTypeDescription
amountNumberThe amount to be paid for the transaction.
descriptionStringA short description of the payment.⚠️ Note: Avoid using spaces (" ").
tag1String(option)(Optional) Custom field #1 for your internal reference.
tag2String(option)(Optional) Custom field #2 for your internal reference.
tag3String(option)(Optional) Custom 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
{
  "amount": 10000,
  "description": "buy products",
  "tag1": "shopName",
  "tag2": "0133045350345435",
  "tag3": "myKey",
  }

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=551f8eb7-1976-4
  d1c-b7a9-e0438d752e63"
}

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 : Once you receive 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 for payment in this page user can open Bank app with App Link or Scan QR for payment

payment-link-qr

Step 3 : 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

payment-link-qr-success

3.4 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

Response Data

FieldTypeDescription
messageStringStatus message of the transaction response.
refNoNumberReference number for the transaction.
billNumberStringUnique identifier for the bill.
txnDateTimeString (Date)Datetime 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.
userIdStringId of user in PhaPay system
transactionIdStringUnique identifier for the transaction.
statusStringStatus of the transaction.
tag1StringAdditional tag or note related to the transaction.
paymentMethodStringPayment method used (BCEL,JDB,...)
successURLString (URL)Success Callback URL.
Read More:

Explore the full Payment Link documentation for detailed integration guidelines .

Click here to access:

Payment Link Documentation (PDF)