Linking Braintree as a source

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.

Learn more
PostHog Wizard hedgehog

Contents

The Braintree connector syncs your payment data into PostHog, including transactions, refunds, disputes, customers, subscriptions, and merchant accounts.

Supported tables

TableDescription
transactionsPayment transactions including amount, status, currency, order ID, merchant account, and payment method type
refundsRefund records including amount, status, the refunded transaction reference, and order ID
disputesDispute records including amount disputed, status, type, case number, and received date
customersCustomer records including name, company, email, phone number, and website
recurring_billing_subscriptionsSubscription records including status, plan ID, price, balance, billing cycle, and billing dates
merchant_accountsMerchant 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 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 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

OptionTypeRequired
EnvironmentselectYes
Public keytextYes
Private keypasswordYes

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
transactions

A single attempt to move money — a sale or credit processed through Braintree.

Incremental, Full refreshcreatedAt—
refunds

A refund returning funds from a settled transaction back to the customer.

Incremental, Full refreshcreatedAt—
disputes

A customer's challenge of a transaction with their bank (a chargeback) and its status.

Incremental, Full refreshcreatedAt—
customers

A person or business you have stored in the Braintree vault, resolving the customer behind transactions and subscriptions.

Incremental, Full refreshcreatedAt—
recurring_billing_subscriptions

A recurring billing subscription charging a payment method on a repeating schedule, with its current state and billing timeline.

Incremental, Full refreshcreatedAt—
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.

Still have questions?

Was this page useful?