> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Linking Braintree as a source Canonical URL: https://posthog.com/docs/data-pipelines/sources/braintree > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [Supported tables](#supported-tables) - [Adding a data source](#adding-a-data-source) - [Configuration](#configuration) - [Supported tables](#supported-tables-1) - [Sync details](#sync-details) ![](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` ![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png) ![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you The Braintree connector syncs your payment data into PostHog, including transactions, refunds, disputes, customers, subscriptions, and merchant accounts. ## Supported tables | Table | Description | | --- | --- | | **transactions** | Payment transactions including amount, status, currency, order ID, merchant account, and payment method type | | **refunds** | Refund records including amount, status, the refunded transaction reference, and order ID | | **disputes** | Dispute records including amount disputed, status, type, case number, and received date | | **customers** | Customer records including name, company, email, phone number, and website | | **recurring\_billing\_subscriptions** | Subscription records including status, plan ID, price, balance, billing cycle, and billing dates | | **merchant\_accounts** | Merchant accounts including currency, business name, status, and whether the account is the default | All tables except **merchant\_accounts** support incremental syncs on the `createdAt` field. The **merchant\_accounts** table uses full refresh syncs. ## Adding a data source 1. In PostHog, go to the [Data pipeline page](https://app.posthog.com/data-management/sources) and select the **Sources** tab. 2. Click **\+ New source** and then click **Link** next to Braintree. 3. Select your **Environment** – either **Production** or **Sandbox**. Make sure the keys you provide in the next steps match the selected environment. 4. To find your API keys, go to the [Braintree Control Panel](https://www.braintreegateway.com/) and navigate to **Settings** > **API Keys**. If you don't have a key pair yet, generate one. Copy the **Public key** and **Private key**. 5. Paste your **Public key** and **Private key** into the corresponding fields in PostHog. 6. Click **Next**. 7. On the next page, select the tables you want to sync and configure the sync method and frequency. Click **Import**. Once the sync completes, you can start querying your Braintree data in PostHog. ## Configuration | Option | Type | Required | | --- | --- | --- | | `Environment` | select | Yes | | `Public key` | text | Yes | | `Private key` | password | Yes | ## Supported tables | Table | Description | Sync method | Incremental field | Primary key | | --- | --- | --- | --- | --- | | `transactions` | A single attempt to move money — a sale or credit processed through Braintree. | Incremental, Full refresh | createdAt | — | | `refunds` | A refund returning funds from a settled transaction back to the customer. | Incremental, Full refresh | createdAt | — | | `disputes` | A customer's challenge of a transaction with their bank (a chargeback) and its status. | Incremental, Full refresh | createdAt | — | | `customers` | A person or business you have stored in the Braintree vault, resolving the customer behind transactions and subscriptions. | Incremental, Full refresh | createdAt | — | | `recurring_billing_subscriptions` | A recurring billing subscription charging a payment method on a repeating schedule, with its current state and billing timeline. | Incremental, Full refresh | createdAt | — | | `merchant_accounts` | A merchant account funds settle into, resolving the merchantAccountId carried on transactions and subscriptions. | Full refresh | — | — | ## Sync details - **Incremental sync** – For **transactions**, **refunds**, **customers**, and **recurring\_billing\_subscriptions**, PostHog filters server-side using a `greaterThanOrEqualTo` search filter on `createdAt`, so each run gets only new records. Braintree cannot filter disputes by `createdAt`, so each **disputes** sync reads all disputes and PostHog removes duplicates by primary key. - **Partitioning** – Data is partitioned by month on the `createdAt` field. The **merchant\_accounts** table is not partitioned. - **Pagination** – Uses Relay-style cursor pagination. If a sync is interrupted, it resumes from the last successfully synced page.