Release Status Released Supported By Singer community
Availability Free Status Page Braintree Status Page
Default Historical Sync 1 year Default Replication Frequency 30 minutes
Whitelisting Unsupported Destination Incompatibilities None

Connecting Braintree

Braintree Setup requirements

To set up Braintree in Stitch, you need:

Additionally, Stitch’s Braintree integration will only replicate transactions for the default merchant account in your Braintree instance. You can verify the merchant account set as the default by going to Settings > Processing > Merchant Accounts when signed into Braintree.

Step 1: Whitelist Stitch's IP addresses in Braintree

  1. Sign into your Braintree account.
  2. Click Settings > Security.
  3. In the Security Options page, click Edit in the IP and Hostname Restrictions section.
  4. In the IP Address or Hostname field, paste one of the IP addresses from the following list:

    • 52.23.137.21/32

    • 52.204.223.208/32

    • 52.204.228.32/32

    • 52.204.230.227/32

  5. Check the Allow API Access box.
  6. Click Add Allowed Host.
  7. Repeat steps 4-6 for each Stitch IP address in the list above.
  8. After all of Stitch’s IP addresses have been added, click Enable Restrictions.

Step 2: Retrieve your Braintree API credentials

  1. If you haven’t already, sign into your Braintree account.
  2. Click Account > My User.
  3. Scroll down to the API Keys, Tokenization Keys, Encryption Keys section and click View Authorizations.
  4. In the API Keys section, click Generate New API Key.
  5. After the key has been generated, click the View link in the Private Key column.
  6. This will display the Client Library Key page, which contains your Braintree API credentials:

    Braintree API credentials.

Leave the Braintree Client Library Key page open for now - you’ll need the Public Key, Private Key, and Merchant ID to complete the setup in Stitch.

Step 3: Add Braintree as a Stitch data source

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the Braintree icon.

  4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

    For example, the name “Stitch Braintree” would create a schema called stitch_braintree in the destination. Note: Schema names cannot be changed after you save the integration.

  5. In the Merchant ID field, paste your Braintree Merchant ID.
  6. In the Public Key field, paste your Braintree Public Key.
  7. In the Private Key field, paste your Braintree Private Key.

Step 4: Define the Historical Sync

The Sync Historical Data setting will define the starting date for your Braintree integration. This means that data equal to or newer than this date will be replicated to your data warehouse.

Change this setting if you want to replicate data beyond Braintree’s default setting of 1 year. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.

Step 5: Create a replication schedule

In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

Stitch offers two methods of creating a replication schedule:

  • Replication Frequency: This method requires selecting the interval you want replication to run for the integration. Start times of replication jobs are based on the start time and duration of the previous job. Refer to the Replication Frequency documentation for more information and examples.
  • Anchor scheduling: Based on the Replication Frequency, or interval, you select, this method “anchors” the start times of this integration’s replication jobs to a time you select to create a predictable schedule. Anchor scheduling is a combination of the Anchor Time and Replication Frequency settings, which must both be defined to use this method. Additionally, note that:

    • A Replication Frequency of at least one hour is required to use anchor scheduling.
    • An initial replication job may not begin immediately after saving the integration, depending on the selected Replication Frequency and Anchor Time. Refer to the Anchor Scheduling documentation for more information.

To help prevent overages, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.

Initial and historical replication jobs

After you finish setting up Braintree, its Sync Status may show as Pending on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.

Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.


Braintree table schemas

Replication Method: Key-based Incremental Replication Key : created_at
Primary Key : id API Endpoint: Transaction.search()

The transactions table contains info about the transactions in your Braintree account, including the transaction’s status.

Transaction Data & Default Merchant Accounts

Our Braintree integration will only replicate transactions for the default merchant account in your Braintree instance. You can verify the merchant account set as the default by going to Settings > Processing > Merchant Accounts when signed into Braintree.

id
STRING

The ID of the transaction.

created_at
DATE-TIME

The datetime when the transaction was created.

updated_at
DATE-TIME

The datetime when the transaction was most recently updated.

settlement_batch_id
STRING

The ID of the settlement batch that the transaction was processed in.

status
STRING

The status of the transaction. For example: settlement_pending

type
STRING

Indicates if a transaction is a sale or credit.

amount
NUMBER

The amount of the transaction.

service_fee_amount
NUMBER

The portion of a sub-merchant’s transaction revenue that was routed to the master merchant account.

order_id
STRING

The order ID of the transaction.

plan_id
STRING

The plan ID.

gateway_rejection_reason
STRING

Indicates the reason for a status of gateway_rejected. For example: application_incomplete

processor_authorization_code
STRING

The authorization code returned by the processor.

processor_response_code
STRING

The processor response code.

processor_response_text
STRING

The processor response text.

recurring
BOOLEAN

Indicates if the transaction was passed with a recurring ecommerce indicator (ECI) flag.

refunded_transaction_id
STRING

The sale transaction ID associated with a refund transaction.

currency_iso_code
STRING

The currency for the transaction. For example: USD

customer_details__id
STRING

The ID of the customer.

customer_details__email
STRING

The email associated with the customer.

credit_card_details__customer_location
STRING

Indicates the customer’s billing location. For example: this will be US for the United States if the billing address is in the US or if a country isn’t specified.

International will be used if the billing country is not the US.

subscription_details__billing_period_start_date
DATE-TIME

The start date for the current billing period, regardless of subscription status.

subscription_details__billing_period_end_date
DATE-TIME

The end date for the current billing period, regardless of subscription status.

disbursement_details__disbursement_date
DATE-TIME

The date that the funds associated with the transaction were disbursed.

disbursement_details__success
BOOLEAN

Indicates if the funds were disbursed successfully.



Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.