# Linking GoCardless as a source - Docs

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70)

![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d)

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

`npx @posthog/wizard warehouse`

[Learn more](/wizard.md)

![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)

**Alpha release**

This source is currently in **alpha**. The interface and available tables may change.

The GoCardless connector syncs your bank debit payments data into PostHog, including customers, mandates, payments, subscriptions, payouts, refunds, and events.

## Linking GoCardless

1.  Go to the [sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section in PostHog.

2.  Click **\+ New source** and then click **Link** next to GoCardless.

3.  Select your **Environment** — either **Live** or **Sandbox**. Sandbox and live environments use separate API hosts and tokens, so make sure the environment matches your token.

4.  You need an access token from GoCardless. In your [GoCardless dashboard](https://manage.gocardless.com/developers), go to **Developers** > **Create** > **Access token**. Copy the token value.

5.  Back in PostHog, paste your access token into the **Access token** field.

6.  Click **Next**.

7.  Select the schemas you want to sync and configure the sync method and frequency. Click **Import**.

Once the syncs are complete, you can start using GoCardless data in PostHog.

## Available tables

| Table | Description | Sync mode |
| --- | --- | --- |
| customers | Customer records | Full refresh |
| mandates | Bank mandate authorizations | Full refresh |
| payments | Payment transactions | Full refresh |
| subscriptions | Recurring payment subscriptions | Full refresh |
| payouts | Payouts to your bank account | Full refresh |
| refunds | Refund records | Full refresh |
| events | Change log of all GoCardless events | Incremental |

## Sync modes

Only the `events` table supports incremental syncing. All other tables use full refresh.

This is because the GoCardless API only supports filtering on `created_at` — there's no `updated_at` filter. Since core records like payments, mandates, and subscriptions mutate their status over time, an incremental sync based on `created_at` alone would miss those changes.

The `events` table is GoCardless's append-only change log, making it the only table where incremental sync reliably captures all data. This is the same pattern used by other GoCardless connectors like Fivetran.

## Configuration

| Option | Type | Required |
| --- | --- | --- |
| Environment | select | Yes |
| Access token | password | Yes |

## Supported tables

| Table | Description | Sync method | Incremental field | Primary key |
| --- | --- | --- | --- | --- |
| customers | A customer who pays you through GoCardless. | Full refresh | — | — |
| mandates | An authorization from a customer permitting you to collect recurring payments. | Full refresh | — | — |
| payments | A payment collected from a customer against a mandate. | Full refresh | — | — |
| subscriptions | A recurring payment schedule that collects payments against a mandate. | Full refresh | — | — |
| payouts | A transfer of collected funds from GoCardless to your bank account. | Full refresh | — | — |
| refunds | A refund of all or part of a payment back to the customer. | Full refresh | — | — |
| events | An entry in GoCardless's append-only change log, recording what happened to a resource. | Incremental, Full refresh | created_at | — |

### Community questions

Ask a question

### Was this page useful?

HelpfulCould be better