Connect WooCommerce to Bayarcash
The Bayarcash WC plugin adds Bayarcash to your WooCommerce checkout. Each Bayarcash payment channel is a separate WooCommerce payment method with its own settings page and its own keys, so you set up only the channels you want.
The plugin fully supports WooCommerce Subscriptions products. Your customers can pay each renewal by Direct Debit, straight from their bank account. See Direct Debit for subscriptions.
What it supports
Section titled “What it supports”The plugin adds one WooCommerce payment method per channel. This is the name you see in WooCommerce → Settings → Payments, and the title your customers see at checkout until you change it:
| Payment method in WooCommerce | Default checkout title | What your customer pays with |
|---|---|---|
| Bayarcash FPX | Online Banking | FPX online banking |
| Bayarcash DuitNow OBW | Online Banking | DuitNow Online Banking/Wallets |
| Bayarcash FPX Line of Credit | FPX Line of Credit | A credit card account through FPX |
| Bayarcash Credit & Debit Card | Credit & Debit Card | Visa or Mastercard |
| Bayarcash DuitNow QR | DuitNow QR | Any DuitNow QR banking or e-wallet app |
| Bayarcash Shopee Pay | SPayLater / Shopee Pay | ShopeePay or SPayLater |
| Bayarcash BNPL by Boost | Boost PayFlex | Boost PayFlex |
| Bayarcash Boost PayFlex | Boost PayFlex | Boost PayFlex and Boost Wallet |
| Bayarcash Touch ’n Go eWallet | Touch ’n Go eWallet | Touch ’n Go eWallet |
| Bayarcash GrabPay | GrabPay | GrabPay |
| Bayarcash Grab PayLater | Grab PayLater | PayLater by Grab |
| Bayarcash QRIS Online Banking | Indonesia Online Banking | Indonesian online banking (QRIS) |
| Bayarcash QRIS e-Wallet | Indonesia e-Wallet | Indonesian e-wallets (QRIS) |
| Bayarcash NETS Singapore | NETS Singapore | NETS (Singapore) |
| Bayarcash Alipay | Alipay | Alipay |
| Bayarcash WeChat Pay | WeChat Pay | WeChat Pay |
| Bayarcash PromptPay Thailand | PromptPay | PromptPay (Thailand) |
| Bayarcash Direct Debit | Recurring Direct Debit | Weekly or monthly deductions from a bank account |
Bayarcash Direct Debit only appears when WooCommerce Subscriptions is active. A channel only works if it is also turned on for your Bayarcash portal. See Payment channels and Cross-border payment channels.
Before you start
Section titled “Before you start”You need these before you set up the plugin:
- An approved Bayarcash merchant account.
- Your Personal Access Token (PAT), API Secret Key and Portal Key. See Find your API keys.
- WooCommerce installed and active, with the store currency set to Malaysian ringgit (MYR).
- A site that is online and served over HTTPS, so Bayarcash can send payment results back to it.
Install the plugin
Section titled “Install the plugin”The plugin is free on WordPress.org as Bayarcash WooCommerce. To install it:
- In WordPress, go to Plugins → Add New.
- Search for Bayarcash WC and click Install.
- Click Activate.
Set up a payment channel
Section titled “Set up a payment channel”Repeat these steps for every channel you want to offer. Each channel’s settings page has its own copy of every field below.
- Go to WooCommerce → Settings → Payments and open the Bayarcash channel you want, for example Bayarcash FPX.
- Tick Enable/Disable.
- Leave Sandbox Mode cleared for real payments. See Test in sandbox below.
- Optional: change Title and Description, the text your customer sees at checkout.
- Under Credentials, paste your token into Personal Access Token (PAT). The plugin checks it and shows “PAT Token is valid”. You can also click Verify Token.
- Choose your portal in Portal Key. The list fills in once the token is valid.
- Paste your key into API Secret Key.
- Click Save changes.
Optional settings
Section titled “Optional settings”Each channel also has these settings, under Miscellaneous and Additional Charges:
| Setting | What it does |
|---|---|
| Country Restrictions | Shows the channel only to customers from one country. Off shows it to everyone. |
| Email Fallback | The email sent to Bayarcash when your checkout does not ask the customer for one. |
| Debug Mode | Writes extra detail to the WooCommerce logs (WooCommerce → System Status → Logs) for troubleshooting. |
| Place Order Text | The checkout button text. {total} shows the cart total. |
| Logo Size Unit and Logo Size | The size of the channel logo at checkout. |
| Enable Additional Charges | Adds a fee to the order when the customer pays with this channel, set with Fee Name, Charge Type and Charge Amount. |
To take payments into more than one Bayarcash account, use the Bayarcash Multi-Merchant tab in WooCommerce → Settings. It adds extra FPX and DuitNow payment methods, each with its own keys.
Test in sandbox
Section titled “Test in sandbox”Test on the Bayarcash sandbox before you take real payments:
- Get a token, secret key and portal key from the sandbox merchant dashboard. Live keys do not work in the sandbox.
- On the channel’s settings page, tick Sandbox Mode, enter the sandbox keys and click Save changes.
- Place a test order and pay it.
- When it works, clear Sandbox Mode, enter your live keys and save again.
Sandbox mode is set per channel, so check each channel you tested.
How payment results reach your store
Section titled “How payment results reach your store”You do not paste a callback URL into the merchant dashboard. The plugin sends its own return and callback address with each payment, on your site at /?wc-api=bayarcash_callback. When the payment ends, Bayarcash sends the result there and the plugin updates the order. It also re-checks unpaid orders on a schedule.
If orders stay pending after a successful payment, make sure your site is public, uses HTTPS, and that no firewall, security plugin or maintenance mode blocks ?wc-api= addresses. See Callbacks and checksum.
Direct Debit for subscriptions
Section titled “Direct Debit for subscriptions”Bayarcash Direct Debit works with WooCommerce Subscriptions. The customer signs an e-mandate once, and Bayarcash then deducts each renewal from their bank account.
To use it:
- Install and activate WooCommerce Subscriptions.
- Set up Bayarcash Direct Debit like any other channel.
- Create subscription products billed every week or every month. Other billing periods are refused at checkout.
At checkout the customer fills in Identification Type and Identification Number, then approves the e-mandate with their bank. Their bank account is charged a small verification amount, and the order note says whether bank verification passed. A cart can hold one subscription and no other items.
For when deductions happen and how to follow them, see Direct Debit deduction schedule and Direct Debit transactions.
Two habits make a WooCommerce setup smoother:
- Set up only the channels your portal can take. A channel that is not turned on for your portal shows a warning in its settings and fails at checkout.
- Use a separate portal for each shop. Reports and payouts are easier to reconcile when each site has its own portal.
Common issues
I saved my settings but the payment method is switched off again. Why?
The plugin turns a channel off when Personal Access Token (PAT), Portal Key or API Secret Key is empty, and shows "Please enter portal key", "Please enter Personal Access Token (PAT)" or "Please enter API secret key". Each channel keeps its own keys, so fill in all three on that channel's settings page, or use Copy Credentials.
Verify Token says "Invalid PAT Token". What is wrong?
The token is wrong, or it comes from the other environment. With Sandbox Mode ticked, use a token from the sandbox merchant dashboard. With it cleared, use a token from the live merchant dashboard. See Find your API keys.
A channel shows a warning that it "is not enabled for this portal". What do I do?
The portal you picked cannot take that channel yet. Choose a different portal, or ask Bayarcash to turn the channel on for this portal. See Payment channels.
Customers see "This payment method only supports Malaysian Ringgit (MYR) currency." at checkout.
Bayarcash takes payments in MYR only. Set your store currency to Malaysian ringgit (MYR) in your WooCommerce general settings.
I cannot cancel a Direct Debit order. Why?
The plugin blocks it and shows "Direct Debit orders cannot be cancelled." To stop future deductions, cancel the subscription instead, or end the e-mandate. See Change or end a Direct Debit mandate.
Was this article helpful?
Thanks for your feedback.
Sorry this didn't help. WhatsApp us and we'll sort it out with you.

