Event types
Whenever a resource changes state, GoCardless creates an event describing what happened, why, and where it originated. You can fetch events from the Events API, and we also send them to your server in webhooks.
Every event has a resource_type and an action, plus details.origin (who or what triggered it) and details.cause (our scheme-independent reason). Select a resource below to see every combination.
See the Events API to fetch events, the Webhooks reference for how they are delivered, and Stay up to date with webhooks for a step-by-step guide to handling them.
Anatomy of an event
The same event object is returned by the Events API and sent in webhooks. This is an event for a mandate being cancelled through the API:
The pages in this section are organised by resource_type, then action. Under each action, every row is one way that event can happen, identified by its origin and cause.
| Field | What it tells you |
|---|---|
resource_type | The kind of resource that changed, such as mandates or payments. |
action | What happened to it, such as created or cancelled. This is the heading for each section on the resource pages. |
details.origin | Who or what triggered the event. See the values below. |
details.cause | Our simplified, scheme-independent key for why it happened. Use this, rather than details.reason_code, to decide how to handle an event. |
details.description | A human-readable explanation of the cause. It can change without notice, so don't parse it. |
Origins
| Origin | Triggered by |
|---|---|
api | A request to the GoCardless API, from you or an integration acting for you. |
gocardless | GoCardless acting automatically, for example submitting a payment. |
bank | A report from the customer's bank. These events can also include details.scheme and details.reason_code. |
customer | An action by your customer. |
payer | An action by the payer, for example during a billing request flow. |