# Connect Fluent Forms to Bayarcash

> Install Bayarcash for Fluent Forms to take FPX, DuitNow, card and cross-border payments on your Fluent Forms Pro payment forms.
>
> Source: https://docs.bayarcash.com/fluent-forms/

**Bayarcash for Fluent Forms** adds Bayarcash as a payment method on your Fluent Forms Pro payment forms. Your customer fills in the form, pays on the Bayarcash page and comes back to your site.

To see the plugin at work before you install it, try the [live demo](https://form.bayarcash-demo.com/fluentform/).

## What it supports

The plugin adds one payment method per channel. You pick the ones you want on each form:

| Payment method | What your customer pays with |
|---|---|
| FPX Online Banking | FPX online banking |
| Credit Card | A credit card account through FPX |
| DuitNow Online Banking | DuitNow Online Banking/Wallets |
| DuitNow QR | Any DuitNow QR banking or e-wallet app |
| SPayLater | SPayLater by Shopee |
| Boost PayFlex | Boost PayFlex |
| Indonesia Online Banking | Indonesian online banking (QRIS) |
| Indonesia e-Wallet | Indonesian e-wallets (QRIS) |
| NETS Singapore | NETS (Singapore) |

Payments are one-off and in MYR only. Subscriptions and Direct Debit are not supported. A channel only works if it is also turned on for your Bayarcash portal. See [Payment channels](/payment-channels/).

## 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](/api-keys/).
- Fluent Forms Pro installed and active, with the payment currency set to Malaysian ringgit (MYR).

## Install the plugin

The plugin is free on WordPress.org as [Bayarcash for Fluent Forms](https://wordpress.org/plugins/bayarcash-for-fluent-forms/). To install it:

1. In WordPress, go to **Plugins** → **Add New**.
2. Search for **Bayarcash for Fluent Forms** and click **Install**.
3. Click **Activate**.

## Enter your keys

Enter your keys once for all your forms:

1. Go to **Fluent Forms** → **Bayarcash Settings**. The **Global Configuration** tab opens.
   
2. Leave **Enable Sandbox Mode** off for real payments.
3. Paste your token into **Personal Access Token** and click **Verify Token**. It shows "Token verified successfully" when the token works.
4. Choose your portal in **Portal Key**.
5. Paste your key into **API Secret Key**.
6. Optional: under **Miscellaneous**, change **Payment Title**. It is **Bayarcash** by default.
7. Save your settings.

## Add Bayarcash to a form

Once your keys are saved, turn on the payment methods on each form:

1. Open the form in Fluent Forms and go to its payment settings.
2. Turn on the Bayarcash payment methods you want, for example **FPX Online Banking** and **DuitNow QR**.
3. Optional: change each method's **Method Label**. It is "Pay with" and the method name by default.
4. Save the form.

## Use different keys on one form

A form can use its own Bayarcash account or portal instead of the global one:

1. In **Fluent Forms** → **Bayarcash Settings**, open **Form Configuration** and pick the form.
2. Turn on **Customization**.
3. Enter the **Personal Access Token**, **Portal Key** and **API Secret Key** for this form. Here **Portal Key** is a text box, so paste the key from the merchant dashboard.
4. Save your settings.

## Add a processing fee

The **Bayarcash Gateway Fee** tab lets you add a fee to the amount your customer pays. You can set it for **FPX Online Banking**, **Credit Card**, **DuitNow Online Banking** and **DuitNow QR**, as a flat amount, a percentage or both, with a description your customer sees. Other channels use the **DuitNow QR** fee. Fees apply to every form.

## Test in sandbox

Test on the Bayarcash sandbox before you take real payments:

1. Get a token, secret key and portal key from the [sandbox merchant dashboard](https://console.bayarcash-sandbox.com). Live keys do not work in the sandbox.
2. Turn on **Enable Sandbox Mode**. The page shows "Sandbox mode is enabled. Make sure to use sandbox credentials for testing."
3. Enter the sandbox keys, verify the token and save.
4. Submit a test payment on your form.
5. When it works, turn off **Enable Sandbox Mode**, enter your live keys and save again.

A form with **Customization** on has its own **Enable Sandbox Mode** switch. Check it too.

## How payment results reach your site

You do not paste a callback URL into the merchant dashboard. The plugin sends its own address with each payment, on your site at `/index.php?fluentform_payment_api_notify=1`, and Bayarcash sends the result there. The plugin then marks the submission paid or failed.

If submissions stay pending after a successful payment, make sure your site is public, uses HTTPS, and that no firewall or security plugin blocks that address. See [Callbacks and checksum](/callbacks-and-checksum/).

## Tips

Two habits help with Fluent Forms:

- **Put a name and email field on every payment form.** Bayarcash needs your customer's name and email to create the payment.
- **Use Backup and Restore before big changes.** The **Backup and Restore** tab exports your Bayarcash settings so you can put them back later.

## Common issues

### My form shows "Error! Currency not supported. The only supported currency is MYR". How do I fix it?

Bayarcash takes payments in MYR only. Set the currency to Malaysian ringgit in Fluent Forms' payment settings. Until you do, the Bayarcash settings page shows a red notice about non compatible currencies.

### My form shows "Error: Bayarcash does not support subscriptions right now."

Bayarcash for Fluent Forms takes one-off payments only. Remove the subscription item from the form, or use a different payment method for it.

### The Portal Key list is empty or says "Please verify Personal Access Token first".

The list only fills in after the token is verified. Paste your token into Personal Access Token and click Verify Token. If it says "Verification failed", check that the token matches Enable Sandbox Mode: sandbox tokens for sandbox, live tokens for live.

### I see "Bayarcash for Fluent Forms requires Fluent Forms Pro to be installed and activated."

The plugin needs Fluent Forms Pro, not only the free Fluent Forms. Install and activate Fluent Forms Pro, then reload the page.
