Connect Gravity Forms to Bayarcash
Bayarcash for Gravity Forms adds Bayarcash to your Gravity Forms payment forms. Your customer fills in the form, picks a payment method, pays on the Bayarcash page and comes back to your form’s confirmation.
To see the plugin at work before you install it, try the live demo.
What it supports
Section titled “What it supports”You choose which channels your customers see. The options in Payment Channels are:
| Channel | What your customer pays with |
|---|---|
| FPX Online Banking | FPX online banking |
| Credit/Debit Card | A credit card account through FPX |
| DuitNow Online Banking | DuitNow Online Banking/Wallets |
| DuitNow QR | Any DuitNow QR banking or e-wallet app |
| ShopeePayLater | 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.
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.
- Gravity Forms installed and active, with the currency set to Malaysian ringgit (MYR).
Install the plugin
Section titled “Install the plugin”The plugin is listed on WordPress.org as Bayarcash for Gravity Forms. To install it:
- In WordPress, go to Plugins → Add New.
- Search for Bayarcash for Gravity Forms and click Install.
- Click Activate.
Enter your keys
Section titled “Enter your keys”Keys on the global settings page are used by every form that does not set its own:
- Go to Forms → Settings → Bayarcash.
- Paste your token into Personal Access Token (PAT) and click Verify Token. It shows “Token verified successfully!” when the token works.
- Click View Portal and pick your portal from Available Portals. The plugin fills in Portal Key for you.
- Paste your key into API Secret Key.
- In Payment Channels, clear the channels you do not want. All are ticked to start with.
- Leave Enable Sandbox Mode cleared for real payments.
- Save.
Add Bayarcash to a form
Section titled “Add Bayarcash to a form”Each form that takes payments needs a Bayarcash feed. The form also needs a product or total field, and fields for the customer’s name and email.
- Open the form and go to Settings → Bayarcash, then add a new feed.
- Give the feed a name.
- In Configuration Type, choose Global Configuration to use the keys from the settings page. To use a different account or portal for this form only, choose Form Configuration and fill in the keys, channels and sandbox setting that appear.
- Choose the transaction type and the payment amount.
- Under Client Information., map Email and Full Name to your form fields. Phone Number is optional.
- Optional: map Purhase Description (spelt that way in the plugin) to a field whose text goes with the payment.
- Optional: set a Cancel URL, the page your customer goes to if they cancel. Left blank, they go back to the form.
- Save the feed.
When the form loads, your customer sees Select Payment Method with the channels you ticked. You can send emails on the Payment Completed and Payment Failed notification events.
Test in sandbox
Section titled “Test in sandbox”When Enable Sandbox Mode is ticked, payments go to the Bayarcash sandbox using test keys built into the plugin. The keys you entered are not used for the payment.
- Tick Enable Sandbox Mode and save.
- Submit your form and pay on the sandbox page.
- When it works, clear Enable Sandbox Mode, save, and make one small real payment to check your own keys.
A feed set to Form Configuration has its own Enable Sandbox Mode box. Check it too.
How payment results reach your site
Section titled “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 /?callback=bayarcash-for-gravity-forms, and Bayarcash sends the result there. The plugin marks the entry paid, pending or failed, and adds a note to the entry.
If entries 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.
Two habits help with Gravity Forms:
- Always test once with your live keys. Sandbox mode uses the plugin’s own keys, so it does not prove your keys are right.
- Use Form Configuration for separate campaigns. A different portal per form keeps each campaign’s payments apart in your Bayarcash reports.
Common issues
My form shows "Required fields (email and name) must be mapped in the feed settings."
Open the form's Bayarcash feed and, under Client Information., map Email and Full Name to fields on your form. Both are required.
My form shows "Global Bayarcash settings are not properly configured."
The feed uses Global Configuration, but a key is missing on the global settings page. Go to Forms → Settings → Bayarcash and fill in Personal Access Token (PAT), Portal Key and API Secret Key. If the message says "Form-specific" instead, fill in the keys on the feed.
Customers see "Payment gateway error. Please try again later." What happened?
Bayarcash refused the payment request, and the entry was not kept. Check your keys, and that the channels you ticked are turned on for your portal. See Why a payment failed.
WordPress says required dependencies are missing and asks me to run composer install. What do I do?
The plugin files are incomplete. Delete the plugin and install it again from a complete copy supplied by Bayarcash.
Was this article helpful?
Thanks for your feedback.
Sorry this didn't help. WhatsApp us and we'll sort it out with you.

