The GoCardless plugin lets customers pay at checkout by Direct Debit (Bacs, SEPA, ACH, BECS, PAD). The customer authorises a mandate on a GoCardless hosted page, and the order is confirmed when GoCardless confirms the payment.
It is for store owners who have a GoCardless account and want to collect bank payments and subscription renewals.
Requirements
- Joomla 6.0.0 or later.
- J2Commerce 6.3.6 or later.
- A GoCardless account with an access token, a webhook endpoint secret and a creditor ID. Use the sandbox values for testing.
Installation
- Go to System -> Install -> Extensions and upload the plugin package.
- Go to System -> Manage -> Plugins and search for GoCardless Direct Debit.
- Enable the plugin and open it to edit the settings.
Settings
Credential fields change with the Sandbox / Test Mode switch: sandbox fields show when it is on, live fields when it is off.
| Setting | What It Does | Default | Options |
|---|---|---|---|
| Display Name | Name shown to customers at checkout. | GoCardless Direct Debit | Text |
| Display Image | Image shown next to the payment method. | Empty | Media file |
| Sandbox / Test Mode | Sends all transactions to the GoCardless sandbox. No real payments are collected. | Yes | Yes, No |
| Live Access Token | Your live access token (starts with live_). | Empty | Text |
| Live Webhook Endpoint Secret | Secret used to verify live webhook signatures. | Empty | Text |
| Live Creditor ID | Your creditor ID (CR_...). Used to check refund availability. | Empty | Text |
| Sandbox Access Token | Your sandbox access token (starts with sandbox_). | Empty | Text |
| Sandbox Webhook Endpoint Secret | Secret used to verify sandbox webhook signatures. | Empty | Text |
| Sandbox Creditor ID | Your sandbox creditor ID. | Empty | Text |
| Allow Mandate Renewals | Lets stored mandates pay subscription renewals. Also lists mandates as saved payment methods for customers. | Yes | Yes, No |
| Payment Confirmed Status | Order status set when GoCardless confirms the payment. | Order status with ID 1 | Any order status |
| Payment Pending Status | Order status set when the mandate is authorised but the payment is not yet confirmed. | Order status with ID 7 | Any order status |
| Payment Settled Status | Optional status set when the payment is paid out to you. Empty means no change. | Empty | Any order status |
| Payment Failed Status | Order status set when a payment fails, is cancelled or is charged back. | Order status with ID 6 | Any order status |
| Cancel Order Status | Order status set when you cancel a payment from the admin order. | Order status with ID 6 | Any order status |
| Refund Order Status | Order status set when you issue a refund from the admin order. Empty means no change. | Empty | Any order status |
| Debug Mode | Writes debug logging to logs/payment_gocardless.php. Turn off in production. | No | Yes, No |
The plugin also has the standard J2Commerce payment fields: sub-template, surcharge (name, percent, fixed amount, tax class), geozone restriction, minimum and maximum subtotal, thank-you article, custom messages for each payment stage, and dashboard icon options.
How Payments Work
- At checkout the customer chooses the method and clicks Authorise Direct Debit.
- GoCardless shows a hosted page where the customer authorises the mandate.
- After the redirect back, the order gets the Payment Pending Status and the customer sees a pending page.
- When GoCardless sends the payments.confirmed webhook, the order gets the Payment Confirmed Status. This usually takes 2-5 business days.
The method is hidden at checkout when the order is outside the geozone or the subtotal is outside the minimum and maximum.
Webhook Setup
In your GoCardless dashboard, create a webhook endpoint that points to your site and paste its secret into the matching endpoint secret setting.
https://example.com/index.php?option=com_ajax&plugin=payment_gocardless&group=j2commerce&format=json&task=webhook
Admin Order Actions
On an order paid with GoCardless, administrators with permission to edit orders see these buttons.
- Sync Payment Status reads the current payment status from GoCardless and updates the order.
- Cancel Payment works only while the payment is pending submission.
- Check Refund Availability checks whether your creditor account allows refunds.
- Issue Refund refunds the payment. Leave the amount blank to refund in full.
Common Setups
Testing With the Sandbox
- Leave Sandbox / Test Mode on.
- Enter the sandbox access token, endpoint secret and creditor ID.
- Place a test order and authorise the mandate with GoCardless test bank details.
Going Live
- Enter the live access token, endpoint secret and creditor ID.
- Set Sandbox / Test Mode to No.
- Create the webhook endpoint in your live GoCardless account.
Troubleshooting
| Problem | Fix |
|---|---|
| Dashboard shows "GoCardless access token is not configured." | Enter the access token for the mode you are in (live or sandbox). |
| Dashboard shows "GoCardless is running in sandbox mode." | Turn off Sandbox / Test Mode to collect real payments. |
| "Unable to start the Direct Debit authorisation." | Check the access token and enable Debug Mode to read the log. |
| Order stays pending. | Direct Debit takes 2-5 business days. If it stays pending longer, check the webhook endpoint and secret, or use Sync Payment Status. |
| "Your GoCardless creditor account is not enabled for refunds." | Contact GoCardless support to enable refunds. |
Uninstalling
- Go to System -> Manage -> Extensions.
- Search for GoCardless, select the plugin and click Uninstall.