Introduction
Direct Debit is a popular payment method in the UK that allows organisations to pull funds directly from a customer’s bank account on agreed dates. It’s widely used for recurring payments such as memberships, donations, or subscriptions. Unlike credit cards or online payment gateways, the bank network itself handles the transaction, meaning it can take a few days to set up a mandate (approval) before funds can be transferred.
GoCardless is a leading online Direct Debit provider, handling all the complexities of Direct Debit for organisations of all sizes. Once you've setup your GoCardless account with CiviPlus (which is based on CiviCRM), GoCardless allows you to process recurring or one-off Direct Debit payments automatically, while tracking and managing payments within your contact records and recurring contributions.
This guide walks you through how the GoCardless Direct Debit lifecycle works in CiviPlus for membership payments (note that donations follow a slightly different process), focusing on important concepts like the earliest charge date, pending contributions, and how to interpret dates around membership payments.
Background: How Direct Debit Works
Mandate Setup
When a new Direct Debit mandate is created with GoCardless, the supporter provides bank details and authorises your organisation to collect funds.This setup can take a few days, due to the nature of the UK’s Bacs system (the network responsible for Direct Debit).
Earliest Charge Date
GoCardless calculates when the earliest payment can be taken after the mandate is set up. This date often shifts around weekends or bank holidays, as the Bacs system does not run on these days.Payment Collection
Once the earliest charge date is reached, the CiviPlus GoCardless integration processes any pending payments. The funds take around 3–4 working days to clear, with statuses updated automatically in CiviPlus.
1. New Mandates and the “Next Available Payment Date”
When a new recurring contribution is created in CiviPlus using GoCardless (i.e. via a membership signup form, an import, or by a user manually creating the membership), the earliest charge date in GoCardless is stored as the "next available payment date" in CiviPlus on the recurring contribution. This is the soonest possible date that a payment can actually be initiated.
Only once this date is passed, CiviPlus will attempt to take it's first payment for a recurring contribution.
Note: CiviPlus will not attempt to take a payment if the next available payment date field is empty. If it is empty we would suggest to insert a past date and CiviPlus will immediately attempt the next payment. When it does so, it will sync the actual date from GoCardless and update that in the "next available payment date" in CiviPlus.
2. Pending Contributions / invoices
In CiviPlus, recurring contributions automatically generate contributions with a status of "pending" for the relevant periods in advance for the planned payment dates. The number of contributions/invoices will depend on the payment schedule. For example:
For Annual memberships: One contribution per year.
For Quarterly memberships: Four contribution per year.
For Monthly memberships: Twelve instalments are created.
These pending contributions serve as invoices for upcoming payments, providing a clear view of payment schedules and allowing users to modify future payments if necessary. You can edit those contribution records directly or use the "View/modify future instalments" screen which is available from the action menu on the recurring contribution.
3. Understanding the relevant dates fields on the recurring contribution
Once the relevant contributions are created for the current period the “next scheduled contribution date” on the recurring contribution will actually update to be the date of the contribution to follow, i.e. the next scheduled contribution that has not been created yet. This is so the system knows on which date to create the next contribution when the membership next renews.
4. Payment Collection
On the contribution date (i.e the planned payment date), CiviPlus will contact GoCardless to begin the processing of payment for any outstanding amounts on pending contributions. The system will also retry any past contributions with a status of pending attached to the recurring contribution that are not fully paid.
During this time:
You can see whether a contribution is transacting as on the contribution the “External payment in progress” field will have a status of “Yes”. During that time the payment is processing with GoCardless.
Processing times may take 3-4 business days.
5. Payment success
Once GoCardless confirms the payment, CiviPlus will record the transaction as a payment and updates the contribution status to Complete to reflect the successful transaction. The “External payment in progress” field on the contribution will have a status returned to “no”.
6. Payment failure
If the payment fails GoCardless notifies CiviPlus, and:
The “External payment in progress” field on the contribution will have a status returned to “no”.
The "Failure Count" field on the recurring contribution is incremented.
CiviPlus will retry the payment until the Failure Count reaches the “Payment collection number of retry attempts“ under the Payment Plan Settings.
At this point the recurring contribution status is set to Failed.
Useful Tip: If the Recurring contribution reaches the failure count but you would like to retry again you can use search kit to set the failure count to 0 and the status back to in progress.