What This Integration Does
This integration posts every GoCardless Direct Debit collection, fee, and failure into Xero with the customer matched, the invoice marked paid on the date funds clear, and the GoCardless fee recorded as an expense. Mandate creation and cancellation events update the customer record so finance always knows which customers are on Direct Debit and which are not.
For UK businesses, this turns GoCardless from an opaque bank feed line into a transparent contributor to the Xero sales ledger.
The Workflow
When a customer signs a new GoCardless mandate, the integration receives the mandates.active webhook and writes the mandate ID, scheme, and creation date back to the matching Xero contact as custom fields. From that point, scheduled collections — whether triggered by GoCardless Pro on subscription dates or by individual one-off payments — flow into Xero as fully reconciled invoice payments on the date the funds clear, not the date the collection is created.
The specific chain runs like this: GoCardless creates a payment two business days before the collection date. The integration receives the payments.created event and matches it to the open Xero invoice via the mandate ID. When GoCardless emits payments.confirmed, the integration marks the Xero invoice paid against a GoCardless clearing account on the confirmation date. When payments.paid_out fires — the GoCardless payout to the business bank account — the integration posts a transfer from the clearing account to the bank account in Xero with the GoCardless fee deducted, so the clearing account zeroes and the bank line matches the actual deposit.
Failures are handled too. payments.failed reopens the Xero invoice with a flag, fires a notification to the credit control team, and pauses any dependent automations so the customer is not double-charged.
Before and After
Before, the bookkeeper reconciles GoCardless against Xero by importing CSVs at the end of every week, working out which collections corresponded to which invoices, and posting bulk entries that approximate the real activity. Failed Direct Debits get missed for days. The bank feed never quite matches.
After, the Xero sales ledger updates as each collection confirms. Failed Direct Debits trigger a credit control task within minutes. The GoCardless payout matches the bank line exactly, and the Direct Debit accounts close as fast as the rest of the books.
Who Needs This
UK subscription businesses, membership organisations, professional services firms, and B2B SaaS companies that use GoCardless to collect recurring payments and Xero for accounting. The integration earns its place once monthly Direct Debit volume exceeds the point where manual reconciliation is realistic — usually around fifty active mandates.
How We Build This
We build this against the GoCardless API and Xero API, both of which have strong webhook support and OAuth2 authentication. GoCardless is a UK-built payments platform with a well-designed REST API; we handle mandate lifecycle events, payment status transitions, and payout reconciliation in a single integration layer. See the Xero API Integration page for the Xero capabilities involved.
Get GoCardless and Xero Connected
If GoCardless is a healthy share of your revenue but a recurring headache in Xero, we can connect the two with a custom integration that handles mandates, collections, failures, and payouts cleanly.