I'm trying to use Zapier to update Google Sheets with payment information from GoCardless. I can't see anything in the received event webhook that I can use to match a payment to a customer though.
events:
1:
id: EVTExxx8B
created_at: 2021-03-29T21:57:38.658Z
resource_type: payments
action: confirmed
links:
payment: indxxx23
details
origin: gocardless
cause: payment_confirmed
bank_account_id: BA00xxx9N
description: Enough time has passed since the payment was submitted for the banks to
return an error, so this payment is now confirmed.
metadata:
meta:
webhook_id: WB00xxxQTY
querystring:
I presume I need to match one of these IDs against the list of customers via the API but I'm a bit stuck on how to do this with Zapier. I can't find anything in the documentation to help (that I understand at least anyway). Has anyone managed to achieve anything similar please? Many thanks.
Not a full answer as I am not familiar with the details of Zapier, but this might point you in the right direction.
You can use the
payment
link (events -> links -> payment
) to get the payment resource from their API, which will have amandate
link, which you might have saved somewhere. If not saved, you will need yet another query on themandate
which will give you the associatedcustomer
.