# Braintree

{% hint style="warning" %}
This step is only required if you are using the [Braintree](#setup-braintree) PRO plugin.&#x20;
{% endhint %}

Since Braintree does not offer support for Sales Tax, we have built our own system to handle this functionality. It a high level overview it involves setting up a Tax Add On in side of Braintree, and if the customer needs to be charged VAT, then we dynamically set this price and charge them accordingly.

### Setup&#x20;

For Braintree we're going to create an Add-on with an arbitrary price, and a unique id. When a customer pays with PayPal, we'll calculate any taxes and override the arbitrary price that you'll set when creating the Braintree Addon.

1. Log in to your Braintree account and click the Add-ons/Discounts tab.
2. Click "New add-on"
3. Give it a special id of tax. The name and description can be whatever you wish.
4. Give it a price of 1. This amount be overridden if taxes are applied to a customer purchase.

![](/files/3xLIXjYUBzVhIoWCifUy)

That's it! No further setup is needed for Braintree.

### Orders

Since Braintree does not have support for taxes, we calculate those ourselves.

We will calculate Braintree taxes for both one time payments, and recurring subscription payments. This works by locating the customer using their IP address, calculating the taxes according to their location, and displaying them accordingly.

Customers will also be shown a billing address field which will have the Country, State, and Zipcode pre-filled for convenience. If the Country, State, or Zipcode fields are changed then we'll recalculate the taxes.

![](/files/nRdxWG6PHhIxg4L1huMd)

The billing address must be fully completed before paying for a product or subscription.

The applicable Sales Tax is also shown to the customer when their order is confirmed, as well as on their PDF payment receipt when downloaded from their customer account.

![](/files/HhJi69C4YNBhMyRZuoCN)

### Subscriptions

When your customer subscribes, we'll calculate any taxes and add them to the final subscription price. We also store the customers zipcode and state which the customer is able to edit within their account.

When a recurring payment is made, we'll again calculate any taxes (using their saved location) and again add them to the final invoice for the customers subscription.&#x20;

If a customer doesn't have at least the Country, State, and Zipcode saved into their billing address, then no taxes will be collected.

When viewing their dashboard, the customer will always have an idea of what their next bill will be (unless they change their billing information before the next payment).

![](/files/1auaMh7sqU1F6nFvmJxB)

### Gotchas

It's important to know that Braintree does not support Sales Tax, VAT, or GST. And although we've made a concerted effort to bridge these gaps, it's still not perfect.&#x20;

Take these two Subscriptions as an example.

![](/files/LbE8L0DBYY7ZDv20JJaT)

The tax is the same for both yet the Totals are slightly different. This is because, since Stripe natively integrates Sales Tax, they calculate the tax from the total amount going to use minus any Stripe Fees.

But since Braintree doesn't incorporate this, we calculate the taxes from the Sub Total.&#x20;


---

# Agent Instructions: 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:

```
GET https://docs.mavenseed.com/managing-your-site/settings/taxes/braintree.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
