---
title: Braintree
description: Connect Braintree to collect cards on your own pages with the Drop-in form, with saved cards for automatic renewals.
domain: payment
status: shipped
visibility: public
last_verified: 2026-08-10
order: 45
---
Braintree, a PayPal service, collects card payments through its Drop-in form embedded on your checkout and invoice pages. It suits businesses that already process with Braintree or want PayPal-backed card processing with an in-page payment experience.

The payment experience is embedded only: Braintree offers no gateway-hosted payment page, so the card form always appears on your pages, served by Braintree. Card data never touches yRecurring.

## Currencies

Braintree charges through per-currency merchant accounts inside your gateway account. yRecurring offers the currencies Braintree supports broadly; which ones actually work is decided by the merchant accounts you hold. A charge in a currency you have no merchant account for fails with Braintree's own message. If you charge a currency that is not your account default, set the matching merchant account ID on the connection.

## Connecting

Go to Settings, then Payment gateways, then Braintree. Credentials live in the Braintree control panel under Settings, then API, then API Keys:

- **Public key** and **Private key**: the API keypair. Use sandbox keys on the test connection and production keys on live.
- **Merchant account ID**: optional. Set it when charges should run under a specific merchant account, for example a non-default currency.

## Webhooks

Create a webhook in the Braintree control panel (Settings, then Webhooks) pointing at the endpoint URL shown on the gateway page. Braintree has no separate webhook secret: deliveries are verified with your API keypair. Webhooks bring in disputes, late settlement outcomes, and customer-revoked payment methods. Charging works before the webhook is set up, since card charges confirm immediately.

## How a payment works

The card form is on the page from the moment it loads, so there is no second step. When the customer presses Confirm payment, the card is first saved to your Braintree vault and then charged. That order matters: a card that fails Braintree's verification is refused before any charge is attempted, so a dead card never reaches your vault.

If the charge itself is declined, the payment fails and nothing is recorded against the customer. They can try again with another card on the same page.

Renewals and [automatic collection](/guide/payments/automatic-collection) charge the saved card. Removing a card in yRecurring also deletes it from your Braintree vault.

## Refunds

Refunds adapt to Braintree's settlement timing on their own: a full refund of a payment that has not settled yet is voided, a settled one is refunded, and partial refunds go through once the payment has settled. See [refunds](/guide/payments/refunds).

## Test cards

| Card | Number | Notes |
|---|---|---|
| Visa, succeeds | 4111 1111 1111 1111 | any future expiry, any CVV |
| Mastercard, succeeds | 5555 5555 5555 4444 | any future expiry |
| Processor declined | 4000 1111 1111 1115 | declined by the sandbox processor |

## Limits

- Cards only, embedded only. There is no hosted redirect page: the card form always appears on your pages. The update-card link you send customers, the customer portal, and your own Add card button all use the same in-page form.
- 3-D Secure is not yet offered on this gateway in yRecurring. If most of your customers are in the UK or EU, use Stripe or Adyen for now.
- The migration vault pull does not read Braintree yet; saved cards migrate in with the [file import](/guide/import/migrating-payment-methods).
