Skip to content

Popular searches

Send BCL payment links from WooCommerce orders

Updated

BCL Payment Link adds a BCL Payment Link column to your WooCommerce orders list. For an unpaid order, you make a BCL payment link with one click. Then you send it to your customer, for example by WhatsApp or email. When the customer pays, the plugin marks the order as paid. Use it to recover orders that customers did not complete.

The plugin uses BCL, which takes the payment through Bayarcash. See What is Bayarcash.

All links from your site use one payment method. You choose it in Payment Method:

Option What your customer pays with
FPX (Current & Saving Account) FPX online banking
Line of Credit A credit card account through FPX
DuitNow OBW DuitNow online banking or e-wallet

You need these before you set up the plugin:

  • WooCommerce installed and active. The plugin needs it.
  • A BCL account that is connected to Bayarcash. To register, go to bcl.my/register.
  • A BCL API token with API Read and API Write. See Create an API token in the BCL help centre.
  • Your Bayarcash Portal Key. See Find your API keys.

The plugin is free on WordPress.org as BCL Payment Link. To install it:

  1. In WordPress, go to Plugins → Add New.
  2. Search for BCL Payment Link and click Install.
  3. Click Activate.

The settings are on a tab of the WooCommerce settings:

  1. Go to WooCommerce → Settings and open the BCL Payment Link tab. The Settings link under the plugin on the Plugins page opens the same tab.

  2. Fill in the fields:

    Field What to enter
    API Token Your BCL API token. Required.
    Portal Key Your Bayarcash portal key. Required.
    Order Prefix A short code for this site, for example SITEA. Required. BCL gets the order number as prefix, hyphen and order number, for example SITEA-116.
    Payment Method The payment method for every link. It is FPX (Current & Saving Account) until you change it.
  3. Save the changes.

Do this for each unpaid order:

  1. Go to WooCommerce → Orders.
  2. In the BCL Payment Link column of the order, click Generate Payment Link. The plugin shows “Payment link generated successfully. Refreshing page…” and loads the page again.
  3. Click Copy Link. The button shows “Copied!”.
  4. Send the link to your customer.

The plugin also adds a private order note with the link: “BCL payment link generated: …”. The link uses the amount, name, email and phone number of the order.

The plugin checks the status of each link about once a minute. It checks the 50 newest orders that have a link and the status Pending payment, On hold, Cancelled or Failed. Then it changes the order:

Payment result in BCL Order status Order note
Paid Processing “Payment received via BCL Payment Link”
Cancelled Cancelled “Payment cancelled”
Failed Failed “Payment failed”

While the payment is new or pending, the order stays as it is.

  • Use a different Order Prefix on each site. The plugin finds each payment by its order number. Two sites with one prefix can mix their payments.
  • Run WP-Cron from the server. On a quiet site, set up a server cron job for WP-Cron. Paid orders then change status on time.

Common issues

Clicking Generate Payment Link shows "Error: Failed to generate payment link". What do I check?

Check the API Token and the Portal Key in WooCommerce → Settings → BCL Payment Link. The token must have API Write. The WooCommerce logs, source bcl-payment-link, show the reply from BCL.

My customer paid, but the order still shows Pending payment. Why?

The plugin checks the payment about once a minute with WP-Cron, which runs only when someone opens your site. On a quiet site the check can come late. Also, do not change Order Prefix after you send a link: the check looks for the order number with the current prefix.

Some orders have no Generate Payment Link button. Why?

The plugin shows the button only for unpaid orders. A paid order shows "Order Paid", or "Order Paid via BCL" when it was paid with a BCL payment link.

Was this article helpful?

Cookie settings

We use Google Analytics to see which guides help and where readers get stuck. It is on by default, and you can turn it off. This device keeps your choice.