Set up GoCardless
The GoCardless gateway collects invoices by Direct Debit (Bacs in the UK, SEPA in the euro area, BECS in Australia, ACH in the US, PAD in Canada and the other GoCardless schemes). The client sets up a Direct Debit once on GoCardless’s own page, and their invoices are then collected from their bank account automatically, as WHMCS and Blesta do with GoCardless.
A Direct Debit payment takes a few working days. The invoice is marked paid when GoCardless confirms the payment, not when it starts.
Before you start
Section titled “Before you start”- The access token. In your GoCardless dashboard, open Developers → Create → Access token, with Read-write access. Copy it: GoCardless shows it once.
- Currencies. Each Direct Debit collects in its scheme’s currency: GBP for Bacs, EUR for SEPA, AUD for BECS, USD for ACH, CAD for PAD. ClientFence refuses to collect an invoice in another currency, so give clients the currency of their bank account.
- Refunds are off on new GoCardless accounts. Ask GoCardless to turn them on if you want to refund through GoCardless.
Set it up
Section titled “Set it up”- Install GoCardless on System → Payment Gateways and open it.
- Paste the access token into Live access token.
- Copy the gateway’s IPN Callback URL. In GoCardless, open Developers → Create → Webhook endpoint, paste that address, and save. Copy the endpoint’s secret into Webhook endpoint secret.
- Turn on Enabled and select Update Gateway. ClientFence checks the access token with GoCardless before it saves it.
GoCardless signs every webhook with the endpoint secret. ClientFence refuses a webhook with a wrong signature, and reads each payment back from GoCardless before it records anything.
Test it first
Section titled “Test it first”The GoCardless sandbox (manage-sandbox.gocardless.com) has its own access token and webhook endpoint. Turn on Test mode, fill in Sandbox access token, and put the sandbox endpoint’s secret in Webhook endpoint secret. Set up a Direct Debit with GoCardless’s sandbox bank details, then use the sandbox’s scenario simulators to confirm or fail a payment.
Settings
Section titled “Settings”| Setting | What it does |
|---|---|
| Pay with the saved Direct Debit | A Pay now with button on the invoice that starts collecting it at once (on by default). |
| Set up on the Payment methods page | Clients set up a Direct Debit without paying an invoice (on by default). |
| Free orders | After a free order that renews, such as a free trial, a client without a saved payment method goes to GoCardless to set up a Direct Debit (on by default). |
There is no “pay once” choice: every GoCardless payment comes from a Direct Debit.
How clients pay
Section titled “How clients pay”On the invoice, the account owner selects Pay by Direct Debit and set up automatic payments, fills in their bank details on GoCardless’s page and comes back to the invoice. Once a Direct Debit is saved, Pay now with starts collecting the invoice at once. Renewal invoices are collected automatically, as described in Saved cards and PayPal accounts. Staff can start a collection now with Charge on the invoice.
While a payment is being collected, the client’s invoice shows Payment pending: no second payment starts, and reminders and suspension wait. When GoCardless confirms the payment, the invoice is paid.
If the payment fails, the invoice is unpaid again and counts one failed try, as a declined card: the client gets an email with a link to pay it, and ClientFence collects it again on the days of your retry settings. The client can also pay it at once with Pay now with. Keep GoCardless’s own automatic retries (Success+) off, so a failed payment is not collected twice.
On the Payment methods page, the client can remove the Direct Debit. This cancels it at GoCardless too. They cannot remove it while a payment is being collected. A Direct Debit that the client cancels at their bank, or that GoCardless cancels, is removed from ClientFence.
Chargebacks
Section titled “Chargebacks”When a paid payment is charged back, or fails after it was confirmed, ClientFence takes it back as it does a Stripe dispute: the payment comes off the invoice, and the services it renewed go back by their period.
Refunds
Section titled “Refunds”When you refund an invoice paid with GoCardless, choose Send it back through GoCardless (see Refunds). The refund is recorded only when GoCardless accepts it. If refunds are off for your account, ClientFence says so: ask GoCardless to turn them on.

