---
title: Payment Gateway Configuration
slug: payment-gateway-configuration
docTags: 
createdAt: 2026-03-06T19:27:17.314Z
---

To accept online payments, you need to connect a payment gateway to your academy. REMMU currently supports **CommercePay** for online card and FPX payments.

## 🔗 Supported Gateways

| Gateway         | Type                                    | Status    |
| --------------- | --------------------------------------- | --------- |
| **CommercePay** | Online card, FPX, e-wallets, DuitNow QR | Available |

:::hint{type="info"}
**Note:** Bank transfer (manual proof upload) does not require a gateway — it works out of the box.
:::

***

## ⚙️ Setting Up CommercePay

### Step 1: Get Your CommercePay Credentials

You need a CommercePay merchant account. If you don't have one, contact CommercePay to sign up.

Once approved, you'll receive:

- **Merchant ID**
- **API Key**
- **Secret Key**

### Step 2: Enter Credentials in REMMU

Go to **Settings → Billing → Gateway Configuration** and select **CommercePay**.

Enter:

- Merchant ID
- API Key
- Secret Key

Click **Save**.

### Step 3: Test the Connection

Click **Test Connection** to verify your credentials are correct. REMMU will make a test call to CommercePay and confirm the connection is live.

### Step 4: Enable CommercePay

Once the test passes, toggle CommercePay to **Enabled** under **Settings → Billing → Payment Methods**.

Members can now choose online payment at checkout.

***

## 💰 Processing Fees

You can choose whether gateway processing fees are absorbed by your academy or passed on to the member at checkout.

Go to **Settings → Billing → Gateway Configuration → Processing Fee**.

### Who Pays the Fee

| Option                  | What Happens                                                                    |
| ----------------------- | ------------------------------------------------------------------------------- |
| **Academy absorbs fee** | Member pays the exact invoice amount; the gateway fee comes out of your revenue |
| **Pass to member**      | A processing fee line is added to the member's checkout total                   |

### Fee Type

Choose how the fee is calculated:

| Type           | Example                          |
| -------------- | -------------------------------- |
| **Percentage** | 2.5% of the payment amount       |
| **Fixed**      | RM 1.50 flat fee per transaction |

Enter the value and fee type, then click **Save**. The fee is applied automatically at checkout for all online payments through this gateway.

### Member Checkout Preview

When the processing fee is passed to the member, the checkout screen shows a breakdown:

```javascript
Class Fee:          RM 150.00
Processing Fee:     RM   3.75  (2.5%)
─────────────────────────────
Total:              RM 153.75
```

:::hint{type="info"}
**Note:** Bank transfer payments are not affected — processing fees only apply to online gateway payments.
:::

***

## 🎛️ Per-Channel Fee Configuration

CommercePay supports several payment channels (FPX, DuitNow QR, credit cards, e-wallets, Apple Pay, etc.). Each channel can have its own processing fee — useful when CommercePay's costs vary by channel and you want to charge members the actual cost of each rail.

Configure per-channel fees in the **Per-Channel Fees** card under Gateway Configuration. The list automatically shows only the channels your CommercePay merchant account supports.

For each channel, choose:

| Fee mode       | Behaviour                                                                               |
| -------------- | --------------------------------------------------------------------------------------- |
| **Inherit**    | Use the default processing fee set above                                                |
| **None**       | No fee on this channel — useful for absorbing the cost on cheap rails (e.g. DuitNow QR) |
| **Fixed**      | Flat RM amount per transaction                                                          |
| **Percentage** | % of the transaction amount                                                             |

You can also **enable or disable individual channels** with a toggle — disabled channels won't appear at checkout.

### Amount limits per channel category

You can set a **minimum** and **maximum** transaction amount per channel category — **Cards**, **FPX**, **e-wallets**, and **QR codes**. Channels are filtered out at checkout if the invoice amount falls outside their range.

Common uses:

- **Cards: RM 1,000 minimum** — discourage card use for small invoices where the processing fee outweighs the convenience
- **FPX: RM 30,000 maximum** — match the bank's FPX limit so members aren't shown a method that will fail
- **e-wallets: capped at RM 500** — keep low-value impulse payments on wallets

REMMU also displays the **gateway's own limits** (from CommercePay) as a read-only reference below your custom limits, so you don't accidentally set a max higher than the gateway allows.

**Example use case:**

- DuitNow QR: **None** (absorb the small fee, encourage cheapest method)
- FPX: **Inherit** (your default 1.5%)
- Credit Card: **3.0%** (higher than default to cover Visa / Mastercard fees)
- Apple Pay: **Disabled** (don't offer this channel yet)

:::hint{type="info"}
The available channels are detected automatically from your CommercePay merchant account. If a new channel is added by CommercePay, it will appear here on the next refresh.
:::

***

## 🔧 Testing Payments

Before going live, test the payment flow end-to-end:

1. Ensure you're in **test mode** (toggle in Gateway Configuration)
2. Create a test payment for a student
3. Go through the checkout as a member
4. Use CommercePay's test card numbers to simulate a payment
5. Confirm the payment status updates to **Paid** in REMMU
6. Switch back to **live mode** when satisfied

***

## 🔗 Webhook Configuration

REMMU automatically registers its webhook URL with CommercePay when you save your credentials. This allows CommercePay to notify REMMU when a payment is completed, even if the member closes the browser.

No manual webhook setup is required.

***

## ⚠️ Troubleshooting

**Payment stuck in "Processing":**

- The webhook may not have fired. Wait a few minutes, then check the payment status again.
- Admins can manually check the payment status from the payment record → **Check Status**.

**Test connection failing:**

- Double-check your credentials — copy-paste directly from CommercePay dashboard
- Ensure your CommercePay account is active (not pending approval)
- Contact CommercePay support if credentials look correct but still fail
