Ecommerce Checkout
1. Introduction
With PayWay eCommerce Checkout, you can easily accept payments on your website or mobile app. This solution lets your customers pay quickly and securely using Credit/Debit Cards, ABA Pay & KHQR (via ABA Mobile or other KHQR-supported banking apps), WeChat Pay or Alipay — to give them a seamless and secure checkout experience.
Common Use Cases
- Online shopping – Accept payments for products and services.
- Wallet top-ups & digital services – Let users add funds or pay for digital services.
- Subscriptions & bills – As a checkout to process recurring payments and utility bills.
- On-demand services – Handle payments for food delivery, ride-hailing, and more.
- Event bookings – Enable seamless ticket and reservation payments
2. How it works
- The customer selects a product or service and clicks "Pay".
- They choose a payment method, and a checkout modal appears.
- The customer completes payment with their chosen method (credit/debit cards, ABA Pay, KHQR, WeChat Pay, Alipay, or Google Pay).
- Once the payment is processed, your system receives a callback notification with the payment status.
- Your system verifies the payment and confirms the order.
Selling on an eCommerce platform? See our eCommerce Checkout Plugins instead!
3. Set up your payment selection UI
To ensure a smooth payment experience, your platform must include UI to accommodate the online payment acceptance. This includes:
- A section where customers can choose a payment options they want to pay with.
- A "We Accept..." area that shows the payment options you offer.
You must follows PayWay eCommerce checkout guidelines to ensure seamless customer payments.
4. Integration Steps
Before you start, make sure you have the following:
- PayWay Sandbox Account – Register here to test transactions.
- Sandbox Merchant ID & API Key—You’ll receive these via email after registering for the sandbox.
To integrate online payments on your website or mobile app, follow these steps:
When the customer selects "Pay" and chooses a payment method, call the Create Transaction API to generate a transaction and display it on your platform.
Sample Request
PayWay will respond with a HTML response that contains the checkout interface, which you must render on your website/platform for the customer to complete the payment.
Sample Response (Varies Based on Payment Method):
Use the Check Transaction API to confirm whether a payment was successful.
After you create a payment, call the API with the transaction ID to check its status. Please respect the rate limit of 600 requests per second and stop checking once a result is returned.
For response details and error explanations, see the API guide here:
Check transaction API
Once the customer completes the payment, PayWay will send the transaction details and other important information to the return_url.
- If return_url is not provided in the request, PayWay will use the default return_url configured in the API Settings.
- If you provide a custom return_url, make sure the domain is whitelisted in your merchant profile.
Your return_url endpoint must:
- Accept the HTTP POST method
- Accept Content-Type: application/json
We highly recommend securing this URL to ensure that only ABA PayWay has access to it.
Sample Callback Response
Payment transaction ID generated by the payment gateway.Max. Length: 20
Transaction approval code.Length: 6
Request status code.Value: 0
Additional return parameters encoded as a string containing order details and metadata.
Original transaction amount before discount.
Original transaction currency.eg. USD or KHR
Amount that the customer has paid.
Payment currency that the customer used to pay.eg. USD or KHR
Amount that customer suppose to pay after discount.
Discounted amount and its currency follow original currency.
Created date of the transaction in payment gateway database.Format: YYYY-MM-DD HH:MM:SS
Payer's first name.
Payer's last name.
Payer's email.
Payer's phone number.
Unique booking entry reference number from ABA Core banking system.
Payment method that the customer used to make payment. Possible values:
ABA Pay— Transaction made with ABA Account (ABA Mobile)Alipay— Transaction made with AlipayWechat— Transaction made with WeChat payKHQR— Transaction made with KHQRVISA— Transaction made with Visa cardMC— Transaction made with MastercardJCB— Transaction made with JCB cardCUP— Transaction made with UPI card
Masked ABA Account Number or Masked Card PAN. For other payment options, it will be blank.
If payment is made with ABA PAY, it will show ABA Bank and if payment made using KHQR it will show issuer bank name.
Possible values:
ONUS— Transaction is made with ABA bank cardOFFUS_DOMESTIC— Transaction is made with other local bank cardOFFUS_INTERNATIONAL— Transaction is made with other international bank card
Verify Callback Signature
For security purposes, PayWay includes a hash signature in the request header.
You should verify this signature to confirm that the callback was sent by PayWay and that the data has not been modified.
Below is an example in PHP demonstrating how to:
- Read the callback data
- Generate the signature
- Compare it with the signature received in the header
PHP Example