Sales Tax
Depending on your location, you may need to apply sales tax to subscription costs. If you use Braintree as your payment provider, Zephr allows you to configure and display sales tax during the payment process. This feature automatically calculates and applies tax based on user attributes such as state, region, or country.
When configured, subscription prices will appear in the following format:
$x + $y (tax)
Prerequisites
Before configuring sales tax in Zephr, ensure the following:
- You have admin-level access to your Zephr tenant.
- You have an active Braintree account with administrative access.
- You understand your tax requirements by jurisdiction, for example, US states, EU VAT zones.
- Your site is configured to use Braintree as a payment gateway in Zephr.
To configure sales tax for Braintree payments in Zephr, you must complete the steps in this section.
Step 1: Set Up Tax Add-On in Braintree
- Log in to your Braintree Control Panel (use production URL for live accounts).
- Navigate to Subscriptions > Add Ons/Discounts.
- Click Create an Add-On.
- Configure your add-on with these settings:
|
Field |
Value |
Description |
|
ID |
sales_tax (or your preferred identifier) |
Unique identifier for the add-on. |
|
Name |
Sales Tax |
Display name for the add-on. |
|
Description |
Calculated sales tax |
Optional description. |
|
Amount |
1.00 |
Set to any value - Zephr will override this with the calculated percentage.This value does not affect the final tax; Zephr uses the Add-On as a reference for applying a tax percentage. |
|
Duration |
Duration of Subscription |
Tax should apply for the entire subscription period. |
Add-ons and discounts must be created from the Control Panel. Via the API, you can only view existing add-ons and discounts and add them to a subscription. Also, the Add-On amount value is symbolic and only used to trigger tax logic on the Zephr side. It has no impact on the actual tax applied.
- Click Create.
- Record the Add-On ID. You will need this for the Zephr configuration.
Step 2: Configure Sales Tax Plugin in Zephr
- Log on to your Zephr Admin Console.
- Navigate to Settings > Extensions > Sales Tax (under the Internal section).
- Click Configuration and enter the following details:
- Braintree Add-On ID: Enter the Add-On ID you created in Braintree.
- Tax Label: Enter a label, for example, Sales Tax, that appears next to the tax amount.
- User Attribute Field: Enter the attribute used to determine tax eligibility. For example, you can select State, to charge tax to users in particular US states.
- Click Done to save the configuration.
- Click User Attribute Mapping.
- In the JSON input box, map user attribute values to tax percentages. For example:
{
"NY": "10",
"CA": "8.25",
"TX": "6.75"
}
- Percentages can be integers (10) or decimals (8.25).
- Attribute keys are case-sensitive.
- JSON must be valid. Ensure that all keys or values are wrapped in quotes and formatted correctly.
Examples:
US State Tax Rates:
{
"NY": "8.25",
"CA": "7.25",
"TX": "6.25",
"WA": "6.5",
"FL": "6.0"
}
Country-based Tax (VAT):
{
"GB": "20",
"DE": "19",
"FR": "20",
"ES": "21"
}
Regional Zones:
{
"ZONE_1": "5.0",
"ZONE_2": "7.5",
"ZONE_3": "10.0"
}
- Click Done to save the mapping.
- In the Activate Plugin section, use the toggle to enable the plugin per site. Alternatively, click Select All Sites to activate on all.
- Click Save.
Step 3: Test the Sales Tax
You can test the plugin as follows:
- Register as a user and specify NY as your state
- Navigate to a payment page. You see any subscription prices with an additional 10% added for tax.
- Register as a user and specify a different state
- Navigate to a payment page. You see the usual price.
