Happy Business Starts Here

GoCardless: Zuora payment method needs to be updated when a BACS transfer of bank account occurs

GoCardless: Zuora payment method needs to be updated when a BACS transfer of bank account occurs


Currently when a UK Direct Debit (BACS) customer experiences a change of accounts details via the BACS process (ADDACS 3, ADDACS C, ADDACS E, AUDDIS C), GoCardless will update their instance of the mandate so all future payment request go to the correct bank account.

However the updated details are not reflected in the Zuora instance of the mandate & direct debit details, so any Call Centre agent speaking with a customer will not know that payments are being taken from a different account. This will obviously cause issues as the Agent & Customer will believe the BACS transfer process has not worked. 


To resolve this we recommend that Zuora:

1) extend their query of GoCardless mandate events to include the events mention above

2) update the Mandate & Payment Method record in Zuora

3) create a new type of Notification Event that allows us to know that a mandate / payment method has been changed due to a specific BACS reason code


Zuora Alumni

Hi Blair,


Thanks for your detailed feedback and suggestions, this is really helpful. We've spoken with the GoCardless team recently and we're looking at improving this process and capturing more events from GoCardless in general. Stay tuned.

Zuora Alumni
Status changed to: More Feedback Needed
Community Manager
Status changed to: Under Consideration

Our understanding is that Zuora closed the payment method when the DD is canceled as a result of the Gateway Reconciliation module, if this is not the case we need to know. We also need Zuora to support "Swtiching Paul". https://developer.gocardless.com/pro/2015-07-06/#testing-your-integration-mandate-transferred


Here's the work around we've had to do which is horrible, but works:

Create a job (Java, Apex, whatever language etc.) to do the following:


  1. Query Go Cardless API "events" endpoint looking for type = "transferred". This will return a list of Go Cardless Mandate IDs 
  2. Query Go Cardless API "mandates" endpoint looking for the related bank account IDs to the list of those mandate IDs (you may just want to query the full list of mandates for efficiency)
  3. Query Go Cardless API "customer_bank_accounts" endpoint looking for Go Cardless's representation of the bank account number and sort code
  4. Query Zuora using Export ZOQL on SELECT Id, TokenId FROM PaymentMethod WHERE BankTransferAccountType = "DirectDebitUK" - this will return all payment methods from Zuora.
  5. The "TokenId" on the PaymentMethod object is actually Go Cardless's Id for the Mandate, that's the link. You can only get it through Export ZOQL, because Zuora don't surface the TokenId on the PaymentMethod in their API (Zuora, please can you provide this to save our devs having to do export ZOQL?)
  6. Either create a custom field on the PaymentMethod in SFDC or create your own DD object in SFDC (we use our own), and create a field called "GoCardlessBankAccountNumber" (also do one for the sort code), then use SFDC Bulk API to update those values from all that hard work you've just done.

We're literally had to develop this work around, it's horrible, and time consuming.


Update: this solution would work except that the Go Cardless API does not return sort codes, only the last 2 digits of the bank account. So therefore we can't even have a work around that's accurate.