> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withampersand.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Braintree

## What's supported

### Supported actions

This connector supports:

* [Read Actions](/read-actions), including full historic backfill. Please note that incremental read is supported for `customers`, `transactions`, `refunds`, `disputes`, `verifications`, and `payments` objects.
* [Write Actions](/write-actions).
* [Proxy Actions](/proxy-actions), using the base URL `https://payments.sandbox.braintree-api.com/graphql`.

### Supported Objects

The Braintree connector supports reading from the following objects:

* [customers](https://developer.paypal.com/braintree/graphql/guides/customers/)
* [transactions](https://developer.paypal.com/braintree/graphql/guides/transactions/)
* [refunds](https://developer.paypal.com/braintree/graphql/reference/#Object--Refund)
* [disputes](https://developer.paypal.com/braintree/graphql/guides/disputes/)
* [verifications](https://developer.paypal.com/braintree/graphql/reference/#Object--Verification)
* [merchantAccounts](https://developer.paypal.com/braintree/graphql/reference/#Object--MerchantAccount)
* [inStoreLocations](https://developer.paypal.com/braintree/graphql/reference/#Object--InStoreLocation)
* [inStoreReaders](https://developer.paypal.com/braintree/graphql/reference/#Object--InStoreReader)
* [businessAccountCreationRequests](https://developer.paypal.com/braintree/graphql/reference/#Object--BusinessAccountCreationRequest)
* [payments](https://developer.paypal.com/braintree/graphql/reference/#Interface--Payment)

The Braintree connector supports writing to the following objects:

* [customers](https://developer.paypal.com/braintree/graphql/guides/customers/) (create/update)
* [transactions](https://developer.paypal.com/braintree/graphql/guides/transactions/) (charge/capture)
* [paymentMethods](https://developer.paypal.com/braintree/graphql/guides/payment_methods/) (create/update)

### Example integration

To define an integration for Braintree, create a manifest file that looks like this:

```yaml theme={null}
# amp.yaml
specVersion: 1.0.0
integrations:
  - name: braintree-integration
    displayName: My Braintree Integration
    provider: braintree
    read:
      objects:
        - objectName: customers
          destination: myWebhook
          schedule: "*/10 * * * *"
        - objectName: transactions
          destination: myWebhook
          schedule: "*/10 * * * *"
    write:
      objects:
        - objectName: customers
    proxy:
      enabled: true
```

## Using the connector

This connector uses **Basic Auth**, so you do not need to configure a Provider App before getting started. (Provider Apps are only required for providers using the **OAuth2 Authorization Code grant type**.)

To integrate with Braintree:

* Create a manifest file similar to the example above.
* Deploy it using the [amp CLI](/cli/overview).
* If you are using Read Actions, create a [destination](/destinations).
* Embed the [InstallIntegration](/embeddable-ui-components#install-integration) UI component, which will prompt the customer for their API credentials.
* Start using the connector!
  * If your integration has [Read Actions](/read-actions), you'll start getting webhook messages.
  * If your integration has [Write Actions](/write-actions), you can start making API calls to our Write API.
  * If your integration has [Proxy Actions](/proxy-actions), you can start making Proxy API calls.

## Getting API credentials for Braintree

1. Log in to your [Braintree Control Panel](https://www.braintreegateway.com/login).
2. Navigate to **Settings** > **API Keys**.
3. Generate or view your API credentials (Public Key, Private Key, and Merchant ID).

<img src="https://mintcdn.com/ampersand-24eb5c1a/WnYZ-uayYGSFhvfc/images/provider-guides/braintree-api-keys.gif?s=b916273993d4fb9f9630976a659a3db9" alt="Braintree API Keys" width="1152" height="648" data-path="images/provider-guides/braintree-api-keys.gif" />

For more details, see the [Braintree API Credentials documentation](https://developer.paypal.com/braintree/articles/control-panel/important-gateway-credentials#api-keys).

Note: Make sure you're using the correct environment (Sandbox or Production) credentials.
