Linking Braintree as a source
The Braintree connector syncs your payment data into PostHog, including transactions, refunds, and disputes.
The Braintree source is currently in alpha. Customer, plan, and subscription data isn't available yet — these live in Braintree's legacy SDK API and are planned as a follow-up.
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 |
All three tables support incremental syncs on the createdAt field.
Adding a data source
In PostHog, go to the Data pipeline page and select the Sources tab.
Click + New source and then click Link next to Braintree.
Select your Environment — either Production or Sandbox. Make sure the keys you provide in the next steps match the selected environment.
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.
Paste your Public key and Private key into the corresponding fields in PostHog.
Click Next.
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 | — |
Sync details
- Incremental sync - All tables support incremental syncs using the
createdAtfield. PostHog filters server-side using agreaterThanOrEqualTosearch filter, so only new records are fetched on each run. - Partitioning - Data is partitioned by month on the
createdAtfield. - Pagination - Uses Relay-style cursor pagination. If a sync is interrupted, it resumes from the last successfully synced page.