#  

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376566/image-preview)
</Frame>


## 1. Introduction

The ABA PayWay Odoo eCommerce Plugin lets you easily integrate ABA PayWay into your Odoo Website store. This provide a secure online checkout experience while offering multiple popular payment methods, including:

- Local: **ABA KHQR**
- International: **Card (Visa, Mastercard, UnionPay), WeChat Pay, Alipay**

## 2. How it Works

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376351/image-preview)
</Frame>

**Full Purchase** — Payment is charged immediately when the customer completes the payment. Supports all payment methods — ABA KHQR, Card, WeChat Pay, and Alipay.

1. Shopper adds items to cart and proceeds to checkout.
2. Shopper selects an ABA PayWay payment method — **ABA KHQR**, **Card**, **WeChat Pay**, or **Alipay**.
3. A **PayWay-hosted payment popup** opens with the correct order amount.
4. Shopper completes payment inside the secure PayWay popup.
5. Upon successful payment, the shopper is redirected to a **thank you page** and the order is **automatically marked as Paid**.

**Authorize then Capture (Card and ABA KHQR only)**
Payment is authorized and a hold is placed on the payer's account — no charge until the Merchant successfully fufiles the order.

1. Shopper adds items to cart and proceeds to checkout.
2. Shopper selects **Card** or **ABA KHQR** as the payment method.
3. A **PayWay-hosted payment popup** opens — shopper authorizes the payment.
4. The amount is **reserved** on the shopper's account — not yet charged.
5. Merchant reviews and **captures** the payment manually from the Odoo backend — full or partial amount.

## 3. Integration Steps

### 3.1 Setup

Follow the steps below to integrate ABA PayWay into your Odoo Website store.

:::info[]
**Prerequisites**

Before integrating ABA PayWay into your Odoo eCommerce store, ensure you have the following:

- A **PayWay Sandbox Account**: **[Register here](https://sandbox.payway.com.kh/register-sandbox/)** to receive your testing Merchant ID and API Key via email.
- An **Odoo 18 instance** with the **Website module active**, hosted on-premise or Odoo.sh. Odoo.com cloud is not supported.
- **Odoo Admin access** — required to install apps and configure payment settings on your Odoo instance.
:::

**Step 1: Download and Install the Plugin**

<Steps>
  <Step title="Download the Plugin">

Go to [apps.odoo.com](https://apps.odoo.com) and search for **ABA PayWay for Odoo eCommerce**. Download the module — you will receive one file: `payment_aba_payway.zip`.



:::highlight yellow 
This plugin is built for **Odoo 18** and is not compatible with earlier versions.
:::
  </Step>
  <Step title="Install the Plugin on Your Server">

      
<AccordionGroup>
  <Accordion title="Using Odoo On-Premise" defaultOpen>
    Unzip the file and copy the extracted folder into your Odoo `addons` directory on the server.

            **Configurations:** 
In `/etc/odoo.conf`, set `addons_path` to include the folder containing the ABA PayWay modules:

```
addons_path = /mnt/extra-addons
```
      
If using Docker Compose, mount your addons folder into the container — map your local `./addons` to `/mnt/extra-addons` in the volume config. Then restart the service:

```bash
sudo docker compose up
```

 
  </Accordion>
  <Accordion title="Using Odoo.sh">
    Module deployment is handled via your GitHub repository — skip the server configuration below and continue the step below.
  </Accordion>
  
</AccordionGroup>


In Odoo:

- Go to **Settings › General Settings** and activate **Developer Mode**
- Go to **Apps › Update Apps List** to sync new modules
- Search for **ABA PayWay for Odoo eCommerce** and click **Install**

<Frame>
![ecommerce.png](https://api.apidog.com/api/v1/projects/831852/resources/379428/image-preview)
</Frame>


:::tip[]
After install, **ABA PayWay** appears as a separate entry under **Website › Configuration › Payment Providers**.
:::

  </Step>
</Steps>

**Step 2: Configure the ABA PayWay Plugin**

<Steps>
  <Step title="Enter Credentials">

Go to **Website › Configuration › Payment Providers** and click on **ABA PayWay**.

<Frame>  
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376352/image-preview)
</Frame>

Enable **Test Mode**, select the **Sandbox** environment, and enter your credentials. Your Merchant ID and API Keys are in the email you received after sandbox registration.

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376323/image-preview)
</Frame>

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376325/image-preview)
</Frame>


**Configuration Fields**

---

**Environment** `mandatory`
Toggle between `Sandbox` (for testing) and `Production` (for live payments). Always start in Sandbox mode to ensure payment is tested properly.

---
**Merchant ID (Sandbox/Production)** `mandatory`
Enter your unique ABA PayWay Merchant ID. You can find it in the email registered for your PayWay Sandbox account. When you're ready to go live, replace it with your production Merchant ID.

---

**API Key (Sandbox/Production)** `mandatory`
Enter your ABA PayWay Sandbox API Key for testing. You can find it in the email registered for your PayWay Sandbox account.

---

**RSA Private Key (Sandbox/Production)** `mandatory`
Used for request signing and response verification.

---

Click **Save** to store your credentials.

  </Step>
  <Step title="Set Capture Mode (optional)">

The capture mode controls whether payment is charged immediately or held and captured later. This applies to all transactions on this provider.

Go to **Website › Configuration › Payment Providers › ABA PayWay** and locate the **Capture Mode** field.

| Mode | Description |
|---|---|
| Full Purchase *(default)* | Payment is captured immediately when the shopper completes the payment popup |
| Authorize then Capture | Payment is authorized and reserved — merchant captures manually from the backend. Supports **Card and ABA KHQR only** |

<Frame> 
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376340/image-preview)
</Frame>

Click **Save**.

  </Step>
  <Step title="Enable Payment Methods">

Go to **Website › Configuration › Payment Providers › ABA PayWay** and locate the **Payment Methods** section. Enable the methods relevant to your store.

| Method | Type |
|---|---|
| ABA KHQR | Local — ABA Mobile and any KHQR-compatible app |
| Card (Visa, Mastercard, UnionPay) | International debit/credit card |
| WeChat Pay | International — WeChat users |
| Alipay | International — Alipay users |

:::tip[]
For production: only enable payment methods confirmed with the ABA PayWay sales team during onboarding.
:::



<Frame>
 
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376327/image-preview)
</Frame>
Only the methods enabled here will appear at checkout.
  </Step>
</Steps>

### 3.2 Testing

**Step 1: Test & Verify the Setup**

To confirm a successful setup, preview your Odoo Website store and test the payment flow to ensure everything works as expected.

**Verification Checklist:**

Go to your store, add a product to the cart, and proceed to checkout.

Verify that the configured ABA PayWay payment methods appear on the payment step:

- ABA KHQR
- Card (Visa, Mastercard, UnionPay)
- WeChat Pay
- Alipay


:::info[]
**All payment methods are available for testing in sandbox mode.** 

For live payments, only the options you've agreed upon with the ABA PayWay sales team will be available.
:::
<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376329/image-preview)
</Frame>

**Step 2: Test Transactions in Sandbox Mode**

<Tabs>
  <Tab title="Full Purchase">

Select a payment method at checkout. A loading state appears briefly, then the **PayWay payment popup** opens with the correct order amount.

**Step 2: Test Transactions in Sandbox Mode**

<AccordionGroup>
  <Accordion title="Credit/Debit Card">
    <Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/379435/image-preview)
</Frame>

Use the test cards below to simulate the payment, then select "**Pay ...USD**".
    
<div class="table-code overflow-y-auto">
  <table class="text-base text-center whitespace-nowrap" style="border-collapse: collapse; width: 100%;">
    <tbody>
      <tr style="background-color: #f5f5f5;">
        <th style="padding: 8px;">Card Status</th>
        <th style="padding: 8px;">Card Type</th>
        <th style="padding: 8px;">Card Number</th>
        <th style="padding: 8px;">Exp</th>
        <th style="padding: 8px;">CVV</th>
        <th style="padding: 8px;">3DS Enrolled</th>
      </tr>
      <tr>
        <td rowspan="2" style="padding: 8px;"> **Success** </td>
        <td style="padding: 8px;">Master Card</td>
        <td style="padding: 8px;">5156 8399 3770 6777</td>
        <td style="padding: 8px;">01/30</td>
        <td style="padding: 8px;">993</td>
        <td style="padding: 8px;">No</td>
      </tr>
      <tr>
        <td style="padding: 8px;">Visa Card</td>
        <td style="padding: 8px;">4286 0900 0000 0206</td>
        <td style="padding: 8px;">04/30</td>
        <td style="padding: 8px;">777</td>
        <td style="padding: 8px;">Yes</td>
      </tr>
      <tr>
        <td rowspan="2" style="padding: 8px;"> **Declined** </td>
         <td style="padding: 8px;">Master Card</td>
        <td style="padding: 8px;">5156 8302 7256 1029</td>
        <td style="padding: 8px;">04/30</td>
        <td style="padding: 8px;">777</td>
        <td style="padding: 8px;">Yes</td>
        
      </tr>
      <tr>
        <td style="padding: 8px;">Visa Card</td>
        <td style="padding: 8px;">4156 8399 3770 6777</td>
        <td style="padding: 8px;">01/30</td>
        <td style="padding: 8px;">993</td>
        <td style="padding: 8px;">No</td>
      </tr>
    </tbody>
  </table>
</div>



  </Accordion>
  <Accordion title="ABA KHQR">
    Select the ABA KHQR payment method to generate a test QR code.
    **For visual reference only
 <Frame>

![image.png](https://api.apidog.com/api/v1/projects/831852/resources/379433/image-preview)
</Frame>
 </Accordion>
  <Accordion title="WeChat Pay">
    Select the WeChat payment method to generate a test QR code.
    **For visual reference only
<Frame>

![image.png](https://api.apidog.com/api/v1/projects/831852/resources/379429/image-preview)
</Frame>
  </Accordion>
   <Accordion title="Alipay">
    Select the Alipay payment method to generate a test QR code.
    **For visual reference only
    <Frame>


![image.png](https://api.apidog.com/api/v1/projects/831852/resources/379432/image-preview)
</Frame>
  </Accordion>
</AccordionGroup>
Complete the payment inside the popup. After successful payment:

- Shopper is redirected to the **thank you page** with order number and status
- Order is marked as **Paid** in Odoo

<Frame>  
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376336/image-preview)
</Frame>

  </Tab>
  <Tab title="Authorize then Capture">

Ensure **Capture Mode** is set to `Authorize then Capture` before testing.

Select **ABA KHQR** or **Card** at checkout and complete the payment as usual.
    
<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/379449/image-preview)
</Frame>


- On the success screen, your customer will sees: **"Your payment has been authorised"** with the order number
- The amount is **blocked** on the shopper's card or ABA account — they will not be charged yet until the transaction has been captured.
 
    
<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376339/image-preview)
</Frame>

**To capture the payment:**

Go to **Website › Orders**, locate the transaction number with status **authorized**.
<Frame>
![Screenshot 2026-07-14 at 5.48.20 in the afternoon.png](https://api.apidog.com/api/v1/projects/831852/resources/379450/image-preview)
</Frame>

Click **Capture Transaction**. Enter the amount to capture — full or partial.

<Frame>
  
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376341/image-preview)
</Frame>

- **Full capture** — full amount is charged to the shopper
- **Partial capture** — partial amount charged, remaining reserved amount is released back to the shopper

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376342/image-preview)
</Frame>

After capture, the transaction status updates from **Authorised** to **Confirmed**.

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376343/image-preview)
</Frame>

  </Tab>
</Tabs>

**Step 3: Confirm Order Status**

After payment, confirm the response status updates correctly.

**✅ Success Status** — order is automatically marked as **Paid** and the shopper is redirected to the thank you page.

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/379445/image-preview)
</Frame>

**❌ Cancelled / Payment failed** — Order stays pending — no charge made.

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/379446/image-preview)
</Frame>

**Step 4: Verify Transactions**

**On ABA PayWay Sandbox Portal**

You can track transaction details inside the **PayWay Sandbox Portal › Transactions** — **[Sign in here](https://sandbox.payway.com.kh/login)**.

<Frame>
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376344/image-preview)
</Frame>

**On Odoo**

Go to **Website › Configuration › Payment Transactions** to see full transaction details, including status, amount, payment method, and capture mode.

<Frame>
![Screenshot 2026-07-14 at 5.25.37 in the afternoon.png](https://api.apidog.com/api/v1/projects/831852/resources/379448/image-preview)
</Frame>

**Step 5: Test a Refund**

ABA PayWay supports both **full and partial refunds** for eCommerce orders. Refunds are initiated from the Odoo backend — the plugin calls the ABA PayWay refund API automatically and the refund is reflected in both Odoo and the ABA PayWay Merchant Portal.

Go to **Website › Orders**, select the paid order and click **Refund**.

<Frame>
  
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376345/image-preview)
</Frame>
<Frame >

![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376346/image-preview)
</Frame>
<Frame>
  
![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376347/image-preview)
</Frame>
- For a **full refund** — keep the full amount
- For a **partial refund** — enter the amount you'd like to refund your customer

<Frame>
  

![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376348/image-preview)
</Frame>

Click **Refund** to process. The refund is applied immediately.

:::tip[]
The refund is automatically reflected in:
- **Odoo** — order status updates and refund record created
- **ABA PayWay Merchant Portal** — transaction appears under your refund history. 
    Note: Transaction refunded using the Merchant Portal does not reflect the transaction status on Odoo. 
:::

## 4. Going Live

**Great job!** You've completed the sandbox testing, and your store is ready to go live.

**Let's make it official!** Follow these steps to start accepting real payments:

<Steps>
  <Step title="Reach out to ABA PayWay to activate your account">

To start accepting real payments, you'll need a production ABA Merchant Account.

If you don't have one yet, please contact our E-Merchant Acquisition team at **[paywaysales@ababank.com](mailto:paywaysales@ababank.com)** to get started today!

  </Step>
  <Step title="Switch to Production Mode">

After finalizing your agreement with our team, you'll receive your production credentials.

Go to **Website › Configuration › Payment Providers › ABA PayWay**.

- Replace your **Sandbox API Key** and **Merchant ID** with your **production credentials**
- Add your **RSA Private Key** issued by the ABA PayWay sales team
- Switch the **Environment** toggle to `Production`

<Frame>

![image.png](https://api.apidog.com/api/v1/projects/831852/resources/376349/image-preview)
</Frame>

Click **Save** to apply your production credentials.

  </Step>
  <Step title="Do a Quick Test">

Make a small live payment on your store to ensure the transaction settles to your ABA merchant account.

  </Step>
  <Step title="Success!">

You did it! Your Odoo Website store is officially live and ready to accept real payments with ABA PayWay.

  </Step>
</Steps>

💡 **Note**

For troubleshooting or if you have any questions, please contact [digitalsupport@ababank.com](mailto:digitalsupport@ababank.com).
