Guides

Setup guide · Herepay for WooCommerce v1.0.3

Accept Herepay payments on WordPress

From an empty WordPress site to your first paid order, in 13 steps. No code needed.

About 30 minutesOnline banking (FPX)Malaysian ringgit

Before you start

  • Admin login to a WordPress site that opens with https:// (a padlock in the address bar).
  • Your Herepay live keys: API Key, Secret Key and Private Key, from your Herepay merchant dashboard.
  • The plugin file herepay-for-woocommerce.1.0.3.zip.
Part 1

Set up the shop

1

Install WooCommerce

WooCommerce adds the shop, cart and checkout. Herepay plugs into it, so it goes first.

  1. In the left menu, go to Plugins → Add Plugin.
  2. Search WooCommerce. On the one by Automattic, click Install Now, then Activate.
iUse the search on the Add Plugin page. The “Search installed plugins” box only searches plugins you already have.
2

Skip the welcome checklist

WooCommerce opens a 5-task checklist. You can skip it: Herepay replaces “Set up payments”, and you’ll go live at the end of this guide.

WooCommerce welcome checklist
The WooCommerce welcome screen. Nothing to do here.
3

Set your country and currency

  1. Go to WooCommerce → Settings → General.
  2. Set the store address country to Malaysia.
  3. Set Currency to Malaysian ringgit (RM) and click Save changes.
Part 2

Connect Herepay

4

Upload the Herepay plugin

  1. Go to Plugins → Add Plugin → Upload Plugin.
  2. Choose herepay-for-woocommerce.1.0.3.zip and click Install Now, then Activate.
Herepay plugin activated
Activated. Note the Settings link under the plugin name; you’ll use it next.
!Seeing “This plugin cannot be activated because required plugins are missing or inactive”? WooCommerce isn’t active yet. Do step 1, then activate Herepay.
Herepay cannot be activated without WooCommerce
What it looks like when WooCommerce is missing.
5

Enter your Herepay keys

  1. Under the Herepay plugin, click Settings.
  2. Make sure Enable Herepay Payment Gateway is ticked.
  3. Set Environment to Production. It starts on Sandbox.
  4. Paste your API Key, Secret Key and Private Key, then click Save changes.
Herepay settings page
Red box: here the browser auto-filled the WordPress username (“user”) and password into the key fields. Clear them and paste your real keys.
!Browsers often auto-fill your WordPress login into API Key and Secret Key. Always check both fields before saving.
6

Add your shop’s URLs in Herepay

This is how Herepay tells your shop that an order has been paid.

  1. On the same settings page, copy the Callback URL and the Redirect URL.
  2. In your Herepay merchant dashboard, open Manage URL.
  3. Paste the Callback URL as Callback URL, and the Redirect URL as Direct URL. Click Add URLs.
Herepay dashboard Manage URL
Herepay dashboard. Your URLs end in /wc-api/wc_herepay_payment_gateway and /herepay-redirect.
7

Check your permalinks

  1. Go to Settings → Permalinks.
  2. Make sure it is not set to Plain. Post name is a good choice.
  3. Click Save Changes, even if nothing changed. This refreshes Herepay’s links.
Permalink settings with Post name selected
Anything except Plain works.
8

Confirm Herepay is active

Go to WooCommerce → Settings → Payments. Herepay should show Active, and business location should be Malaysia.

Herepay active in WooCommerce payment providers
You don’t need Stripe or PayPal. Herepay handles the payments.
Part 3

Checkout & your first product

9

Switch to classic checkout

New WooCommerce stores use a “block” checkout, which this version of the Herepay plugin doesn’t support yet.

  1. Go to Pages, hover over Checkout and click Edit.
  2. Open List View (☰ at the top left) and click Checkout.
  3. In the right sidebar’s Block tab, click Switch to classic checkout. Then click Save.
Switch to classic checkout button
Before: the yellow notice with Switch to classic checkout.
Classic checkout block
After: the page shows “Classic Checkout”. Click Save.
!Skip this step and checkout says “There are no payment methods available”, even though Herepay shows Active.
No payment methods available
10

Add a product

  1. Go to Products → Add New Product. Enter a name and a short description.
  2. In Product data, enter the Regular price. It should show (RM).
  3. Nothing to deliver? Tick Virtual. Selling a file? Also tick Downloadable and add it under Downloadable files.
  4. Click Set product image, then Publish.
WooCommerce product data box
A downloadable ebook: Virtual and Downloadable ticked, price in RM.
Published product page
The published product page your buyers see.
Part 4

Test & go live

11

Buy your own product

  1. Open your product, click Add to cart, then go to Checkout.
  2. Fill in your details and choose Herepay. Pick your bank from the list.
  3. Pay on your bank’s page and follow the screens back to your shop.
iYour store is in “Coming soon” mode until step 13, so only you can see it while logged in. That makes this a safe time to test.
12

Check the order was marked as paid

Go to WooCommerce → Orders. Your test order should change to Processing or Completed on its own. Refund the test from your Herepay dashboard if you like.

!Stuck on Pending payment? Check the Callback URL in step 6 and the permalinks in step 7.
13

Go live

Go to WooCommerce → Settings → Site visibility, choose Live and click Save changes. Your shop is now open to everyone.

✓You’re done. Customers can now pay you with Herepay.
Troubleshooting

If something goes wrong

What you seeWhat to do
“This plugin cannot be activated because required plugins are missing”Install and activate WooCommerce first (step 1).
“There are no payment methods available” at checkoutSwitch to classic checkout (step 9).
Payments fail; API Key shows “user”The browser auto-filled your login. Paste your real Herepay keys (step 5).
Payments fail even with the right keysCheck Environment is set to Production when using live keys (step 5).
Order stays on “Pending payment” after payingCheck the Callback URL in Herepay’s Manage URL (step 6) and that permalinks aren’t Plain (step 7).
Prices show in $ instead of RMSet the currency to Malaysian ringgit (step 3).

See it working.

Buy the setup guide and pay with Herepay yourself.

Go to shop →