Introduction
Welcome to PhaPay Gateway Developer Hub! Thank you for choosing PhaPay Gateway! This guide provides everything you need to understand and integrate our services using the PhaPay API.
PhaPay is designed to solve real-world challenges faced by startups, platforms, and legacy payment integration systems in Laos. We act as a bridge between your application and local financial infrastructure — making it easy to connect with banks and e-wallets in the Lao PDR.
Whether you're building a new platform or modernizing an existing one, our API helps you transition into FinTech quickly and efficiently, without needing to manage complex banking integrations on your own.
This documentation is tailored for developers, but if you're a business owner or non-technical reader, you’ll also find helpful overviews and models to understand how our services work.
What is PhaPay Gateway?
PhaPay Gateway is a PCI-certified payment gateway that offers both a user-friendly management dashboard and a developer-friendly REST API, trusted by a wide range of integration teams and API developers.
Our platform is designed with flexibility and security in mind — allowing you to choose the payment process that best fits your needs. Whether you're working in a sandbox (test) environment or deploying in production, PhaPay ensures a secure, reliable, and seamless experience from start to finish.
Create Your Developer or Platform Owner Account
To get started with PhaPay Gateway, begin by signing up for a trial account. This allows you to explore and test the platform before moving to a live production environment. Both the sandbox (test) and production environments provide access to a powerful dashboard where you can:
- Monitor and manage transaction data
- Configure account and API settings
- Explore sample code and run API experiments such as creating payments or issuing refunds
This setup ensures a smooth and secure integration experience from testing to launch.
🧪 Example: Connecting to the API in Test Environment
You can use the following example to test the PhaPay Gateway API in the sandbox environment.
Note: Be sure to replace the placeholder keys ($SECRET_KEY
or $PUBLIC_KEY
) with your actual test keys found on your PhaPay Portal under the Key Management section.
🏦 Integration with BCEL Bank (QR + Socket)
This section is exclusively for developers integrating with BCEL Bank through the PhaPay Gateway.
🔁 Step 1: Request a QR String
To initiate the payment process, send a request to the API to generate a QR String. This string contains all necessary transaction data and will be used by the customer to complete the payment using the BCEL Mobile Banking App.
The QR will be returned as part of the API response and should be rendered or displayed for the customer to scan.
How to create a QR string with bank
Creating a QR string for payment can be done using the link and method below
curl --location 'https://payment-gateway.lailaolab.com/v1/api/payment/generate-bcel-qr?amount=$AMOUNT&description=$DESCRIPTION' \
--header 'secretKey: $SECRET_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'amount=$AMOUNT' \
--data-urlencode 'description=$DESCRIPTION'
Parameter | Details |
---|---|
secretKey | The value of the code obtained from the account in the Dashboard of the system |
amount | The amount of money that needs to be created to be used for payment |
description | Payment details Note: It should be in English and there should be no spaces in the text because the banking system may consider it incomplete |
Here is the sample of response from the bank
{
"message": "SUCCESSFULLY",
"transactionId": "7d5d7420-e373-431d-b3c0-728a4f138985",
"code": "00020101021133550004BCEL0106ONEPAY0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXVTE6002LA625105367d5d7420-e373-431d-b3c0-728a4f1389850807okaybor63043561",
"link": "onepay://qr/00020101021133550004BCEL0106ONEPAY0216mcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX5303418540115803VTE6002LA625105367d5d7420-e373-431d-b3c0-728a4f1389850807okaybor63043561"
}
Response Parameter | Details |
---|---|
message | A message that shows the status of sending a set of messages in creation QR Code |
transactionId | The ID associated with the payment |
code | Text series of creation QR String |
link | A deeplink that can be used to open the merchant banking app for payment |
🔌 Step 2: Connect via WebSocket to Listen for Payment Result
Once the QR is displayed, open a WebSocket connection to listen for the real-time payment status from BCEL Bank.
This allows your platform to automatically update the payment status without requiring the customer to refresh or manually confirm.
To receive trigger information after the End User makes a payment through the Platform, the customer must have a Socket connection to the Gateway to subscribe and wait to hear the answer from the bank through our Gateway. Connecting to Socket We can connect with the method below
https://payment-gateway.lailaolab.com/
After that, the system must listen to the channel below
private_message:$USER_ID
The request
Response Parameter | Details |
---|---|
USER_ID | User ID that can be obtained from Dashboard |
Payment Method
After the Platform receives the QR string and deeplink from PhaPay Gateway, the End User can make the payment through the commercial banking app (BCEL ONE).
Check your payment history
After creating a transaction, you can check the history of the previous transaction as well as check the status of the transaction
curl --location 'https://payment-gateway.lailaolab.com/v1/api/payment/transaction/${transactionId}'