The GoCardless Gateway add-on when used alongside Give’s Recurring Donations add-on allows donors to set recurring donations at GoCardless. This document explains how to ensure your site is configured correctly to work with GoCardless and Recurring Donations.

How Recurring Donations Work

When a donor initiates a recurring donation using the GoCardless gateway on your Give site, what happens behind the scenes (essentially) is a 6-step process.

  1. The donation is created as “Pending” on Give’s side when the donor clicks to go to GoCardless
  2. A plan is created at GoCardless
  3. A customer is created at GoCardless
  4. The customer is subscribed to the plan at GoCardless
  5. GoCardless charges the first transaction on the plan immediately
  6. The initial transaction is setas “Submitted” on GoCardless’ side the Give site is notified via webhook to mark the initial donation as “Processing”

Then, all of the “heavy lifting” is done from GoCardless’ side to process and complete the initial donation as well as debit the account at the specified interval for subsequent transactions. When one of those events (both the completion of the initial donation as well as all subsequent transactions—which Give calls “renewals”) takes place at GoCardless, they alert your Give website using the webhook set in your GoCardless account.

The webhook is the mechanism to securely report back to your site that an action has taken place at the gateway. Without the webhook properly set, the transactions will still be submitted, completed, and paid out; they just won’t show up correctly at your Give site.

Confirming the Webhook Setup

To set up the webhook, follow the Webhook steps in the Give GoCardless gateway documentation.

screenshot of a list with the heading of STATUS followed by amber-circled statuses of 'pending submission' and 'submitted' as well as green-circled statuses of 'Confirmed' and 'paid out'
GoCardless has more than one status option on their dashboard.
First, a bit of context: Any donation on the Give platform (regardless of gateway) briefly starts as a “Pending” status donation. With credit card gateways where the transaction is instant, it immediately transfers from “Pending” to “Complete.” Since GoCardless has an additional step of 3-7 business days to transition a payment from “Submitted” to “Confirmed” and then ultimately to “Paid out” there is an additional status on Give’s side of “Processing” to account for the delay.

That additional status of “Processing” is an excellent way to confirm that webhooks are set up.

Like every other offsite gateway, when a Donor clicks to go away to GoCardless and finish the transaction, Give temporarily sets the donation status to “Pending” and then waits for an indication from the gateway that the donation was successfully submitted. If the webhook is set correctly, it should relatively immediately transition the donation to “Processing” on the back end of Give. Usually it takes no longer than 30 seconds for that process to complete.

Troubleshooting The GoCardless webhook

GoCardless has some built-in tools for troubleshooting their webhooks, on the Developers tab of their interface. Along the top of the page, there is an option to send test webhooks, as well as simulate an event to confirm that the webhook is working.