Skip to main content

Braintree

This connector captures data from Braintree into Estuary collections.

Supported data resources

The connector automatically discovers bindings for the Braintree resources listed below. By default, each resource is mapped to an Estuary collection through a separate binding.

Full Refresh Streams

Incremental Streams

tip

All incremental streams except Disputes and Transactions only capture creates, not updates, of resources due to Braintree API limitations. To capture updates to these resources, periodic backfills are required. These backfills can be scheduled with the schedule resource config setting. By default, these streams backfill at 20:00 UTC every Friday.

Prerequisites

To set up the Braintree source connector, you'll need the following from your Braintree account:

  1. Merchant ID
  2. Public Key
  3. Private Key

Configuration

You configure connectors either in the Estuary web app, or by directly editing the catalog specification file. See connectors to learn more about using connectors. The values and specification sample below provide configuration details specific to the Braintree source connector.

Properties

Endpoint

PropertyTitleDescriptionTypeRequired/Default
/merchant_idMerchant IDThe unique identifier for your Braintree gateway account.stringRequired
/start_dateStart DateUTC date and time in the format "YYYY-MM-DDTHH:MM:SSZ". Any data before this date will not be replicated.string30 days prior to the current date
/credentials/public_keyPublic KeyBraintree Public Key.stringRequired
/credentials/private_keyPrivate KeyBraintree Private Key.stringRequired
/advanced/is_sandboxSandbox EnvironmentSet to true if the credentials are for a sandbox Braintree environment.booleanfalse
/advanced/window_sizeWindow SizeThe window size in hours to use when fetching data from Braintree. Typically, this is left as the default value unless the connector raises an error stating that the window size needs to be reduced.integer24

Bindings

PropertyTitleDescriptionTypeRequired/Default
/nameData resourceName of the data resource.stringRequired
/intervalIntervalInterval between data syncsstringPT5M
/scheduleBackfill scheduleThe schedule for automatically backfilling this binding. Accepts a cron expression. For example, a schedule of 0 20 * * 5 means the binding will initiate a new backfill at 20:00 UTC every Friday. If left empty, the binding will not automatically backfill.string
/concurrencyConcurrencyMaximum number of concurrent requests used to fetch this stream. Only affects streams fetched via concurrent pagination or batching. Lower this if Braintree reports elevated errors or throttles requests.integerVaries by stream
note

The default concurrency differs per stream, and is set when the binding is discovered:

  • 20 for the Credit Card Verifications, Customers, Subscriptions, and Transactions incremental streams.
  • 5 for the Disputes incremental stream. Each Disputes request re-runs the full search on Braintree's side, so these requests are more expensive than those of other streams.
  • 1 for the full refresh streams, which don't fetch pages concurrently.

Bindings that don't specify concurrency use 20.

Sample

captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-braintree-native:v1
config:
merchant_id: my_merchant_id
start_date: "2024-12-04T00:00:00Z"
credentials:
public_key: my_public_key
private_key: my_private_key
advanced:
is_sandbox: false
window_size: 15
bindings:
- resource:
name: add_ons
interval: PT5M
concurrency: 1
target: ${PREFIX}/add_ons
- resource:
name: credit_card_verifications
interval: PT5M
schedule: "0 20 * * 5"
concurrency: 20
target: ${PREFIX}/credit_card_verifications
- resource:
name: customers
interval: PT5M
schedule: "0 20 * * 5"
concurrency: 20
target: ${PREFIX}/customers
- resource:
name: discounts
interval: PT5M
concurrency: 1
target: ${PREFIX}/discounts
- resource:
name: disputes
interval: PT5M
concurrency: 5
target: ${PREFIX}/disputes
- resource:
name: merchant_accounts
interval: PT5M
concurrency: 1
target: ${PREFIX}/merchant_accounts
- resource:
name: plans
interval: PT5M
concurrency: 1
target: ${PREFIX}/plans
- resource:
name: subscriptions
interval: PT5M
schedule: "0 20 * * 5"
concurrency: 20
target: ${PREFIX}/subscriptions
- resource:
name: transactions
interval: PT5M
concurrency: 20
target: ${PREFIX}/transactions
{...}