> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/braintree.md).

# Braintree

Accept card and wallet payments through Braintree with Hyperswitch.

Braintree is a PayPal service for accepting payments in apps and websites. Merchants can accept cards with mandates, refunds, manual capture, and optional 3DS. Apple Pay, Google Pay, and PayPal are also available, with mandates supported for Apple Pay. Webhooks cover payment and refund updates, and the webhook mapper also recognizes several dispute events (see below).

### Status and capabilities

**Integration status:** live

**Category:** payment gateway

**Webhook flows:** payments, refunds

| Payment method | Type        | Mandates      | Refunds   | Capture methods                         | 3DS                 | Card networks                                               | Countries                                        | Currencies                                        |
| -------------- | ----------- | ------------- | --------- | --------------------------------------- | ------------------- | ----------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------- |
| card           | Credit Card | supported     | supported | automatic, manual, sequential automatic | supported, optional | American Express, Discover, JCB, Mastercard, UnionPay, Visa | 45 ([full list](https://hyperswitch.io/pm-list)) | 134 ([full list](https://hyperswitch.io/pm-list)) |
| card           | Debit Card  | supported     | supported | automatic, manual, sequential automatic | supported, optional | American Express, Discover, JCB, Mastercard, UnionPay, Visa | 45 ([full list](https://hyperswitch.io/pm-list)) | 134 ([full list](https://hyperswitch.io/pm-list)) |
| wallet         | Apple Pay   | supported     | supported | automatic, manual, sequential automatic | not applicable      | -                                                           | -                                                | -                                                 |
| wallet         | Google Pay  | not supported | supported | automatic, manual, sequential automatic | not applicable      | -                                                           | -                                                | -                                                 |
| wallet         | PayPal      | not supported | supported | automatic, manual, sequential automatic | not applicable      | -                                                           | -                                                | -                                                 |

### Authentication

Supply the Public Key and Private Key in the connector configuration. Hyperswitch uses the Public Key as the HTTP Basic username and the Private Key as the password, then Base64-encodes `public_key:private_key`. The shared third credential field is not used for Braintree authentication. See [`BraintreeAuthType::try_from()`](https://github.com/juspay/hyperswitch/blob/740e642eabb5b54094f589d4ebc08aa9e796fab1/crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs#L215-L237) and [`get_auth_header()`](https://github.com/juspay/hyperswitch/blob/740e642eabb5b54094f589d4ebc08aa9e796fab1/crates/hyperswitch_connectors/src/connectors/braintree.rs#L136-L149).

### Before you start

1. Register with Braintree at [braintreepayments.com/sandbox](https://www.braintreepayments.com/sandbox).
2. Create or sign in to your account in the [Hyperswitch control center](https://app.hyperswitch.io/).
3. In the Braintree dashboard, go to **Home → Settings → API** to find the Public Key and Private Key.
4. After completing the activation flow below, copy the webhook endpoint URL from the Hyperswitch Control Center and register it in Braintree under **Home → Settings → API → Webhooks**.
5. Have the credentials listed in [Authentication](#authentication) ready.

To connect Braintree to your Hyperswitch account, follow [Activate a connector on Hyperswitch](/integrations/connectors-integrations/activate-connector-on-hyperswitch.md), then return here for what Braintree supports.

### Webhooks

Hyperswitch verifies Braintree webhook payloads with HMAC-SHA1. The handler reads the signature and encoded payload from the incoming form body ([source](https://github.com/juspay/hyperswitch/blob/93becbaee4ee3686e1a4d5750d2e547c56c27047/crates/hyperswitch_connectors/src/connectors/braintree.rs#L983-L1069)).

The implementation recognizes 7 dispute event names ([source](https://github.com/juspay/hyperswitch/blob/93becbaee4ee3686e1a4d5750d2e547c56c27047/crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs#L2793-L2802)):

| Braintree event         | Hyperswitch effect |
| ----------------------- | ------------------ |
| `dispute_opened`        | Dispute opened     |
| `dispute_lost`          | Dispute lost       |
| `dispute_won`           | Dispute won        |
| `dispute_accepted`      | Dispute accepted   |
| `dispute_auto_accepted` | Dispute accepted   |
| `dispute_expired`       | Dispute expired    |
| `dispute_disputed`      | Dispute challenged |

Other event names are not supported.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/braintree.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
