Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v:2.0:taxes [2021/10/22 20:01] – [Custom Tax Endpoint] marija | v:2.0:taxes [2024/04/12 17:03] (current) – [Using 3rd Party Tax Integrations: Important Notes] foxybrett | ||
---|---|---|---|
Line 84: | Line 84: | ||
Note that **no validation on the number is performed**. | Note that **no validation on the number is performed**. | ||
+ | |||
+ | ==== Tax-Inclusive Pricing ==== | ||
+ | |||
+ | For users in countries where tax-inclusive pricing is common, Foxy allows tax-inclusive pricing. This can get a little more complicated than you might anticipate, so please test this functionality (particularly if you're using coupons and discounts) to ensure thing function as expected for your region. | ||
+ | |||
+ | Foxy's tax-inclusive functionality is largely a // | ||
+ | |||
+ | This is easiest to communicate by way of example. Assume an $83.33 product and a 20% tax. In both cases, the item should be '' | ||
+ | |||
+ | - In a tax-exclusive cart, the item will be displayed as $83.33, the tax will be $16.67, and the order total will be $100. | ||
+ | - In a tax-inclusive cart, the item will be displayed as $100, the tax will be $16.67 (and will show an " | ||
+ | |||
+ | In that sense, this can be considered a " | ||
+ | |||
+ | Please also review the [[./ | ||
Line 112: | Line 127: | ||
We will then contact the tax database provider to alert them. Typically, the rate will then be corrected on the next monthly update. Please note that we can't guarantee whether updates will be made, but we can say from experience that updates do tend to be pretty quick. | We will then contact the tax database provider to alert them. Typically, the rate will then be corrected on the next monthly update. Please note that we can't guarantee whether updates will be made, but we can say from experience that updates do tend to be pretty quick. | ||
- | If this uncertainty presents too significant a challenge, we do support other tax rate integrations with [[http://avatax.com/ | + | If this uncertainty presents too significant a challenge, we do support other tax rate integrations with [[https://offers.avalara.com/mvp/|AvaTax]], [[https:// |
Line 133: | Line 148: | ||
==== Using 3rd Party Tax Integrations: | ==== Using 3rd Party Tax Integrations: | ||
- | The following notes apply for AvaTax, TaxJar, OneSource Indirect, and any other 3rd party tax integrations that may be added to Foxy. | + | The following notes apply for AvaTax, TaxJar, OneSource Indirect, and any other 3rd party tax integrations that may be added to Foxy. The custom tax endpoint has similar considerations. |
+ | |||
+ | tl;dr: | ||
+ | |||
+ | * You should only have 1 approach to taxes for your store. You should not mix an external tax provider (TaxJar, AvaTax, OneSource Indirect, custom tax endpoint) with flat rates or the built-in automatic rates. | ||
+ | * Only set a 3rd-party tax integration at the country level. Details below. | ||
+ | * You should approach the tax integration as though all products will be sent to your tax service, all the time. If you have product categories that are not taxed, you must map that category in Foxy to an untaxed product type in your tax provider. | ||
+ | |||
+ | Basically, you should consider the tax provider to be the authority, and Foxy will do everything it can to ensure that system has all transaction data. | ||
=== Tax Services Override Other Rates Within a Country === | === Tax Services Override Other Rates Within a Country === | ||
+ | |||
If your store is configured with an AvaTax, TaxJar, or OneSource Indirect tax rate for a specific country, that provider will //always// be the authority for transactions in that country, even if the tax configuration in Foxy doesn' | If your store is configured with an AvaTax, TaxJar, or OneSource Indirect tax rate for a specific country, that provider will //always// be the authority for transactions in that country, even if the tax configuration in Foxy doesn' | ||
For instance, if you only have a state-level tax configured in Foxy to use AvaTax for California, but you have California //and// Texas configured in AvaTax, the customer will ultimately be charged Texas sales tax, even though no taxes for Texas are configured in Foxy. This is because Foxy will always defer to AvaTax, if any AvaTax taxes are configured. Similarly, if you have another tax rate (for instance, a static rate) configured in Foxy but //not// in AvaTax, that tax will ultimately be ignored, as AvaTax is the authority. | For instance, if you only have a state-level tax configured in Foxy to use AvaTax for California, but you have California //and// Texas configured in AvaTax, the customer will ultimately be charged Texas sales tax, even though no taxes for Texas are configured in Foxy. This is because Foxy will always defer to AvaTax, if any AvaTax taxes are configured. Similarly, if you have another tax rate (for instance, a static rate) configured in Foxy but //not// in AvaTax, that tax will ultimately be ignored, as AvaTax is the authority. | ||
- | There are three important items to note here: | + | There are four important items to note here: |
- AvaTax, TaxJar, OneSource Indirect, or other tax integrations we support should be configured at the country level. (Currently we do allow them to be configured at the state/ | - AvaTax, TaxJar, OneSource Indirect, or other tax integrations we support should be configured at the country level. (Currently we do allow them to be configured at the state/ | ||
Line 157: | Line 181: | ||
==== Avalara AvaTax 15 Automatic Tax Rates ==== | ==== Avalara AvaTax 15 Automatic Tax Rates ==== | ||
If you have an Avalara account, you can add your credentials to the integrations page as shown (Here, the '' | If you have an Avalara account, you can add your credentials to the integrations page as shown (Here, the '' | ||
- | {{ : | + | {{ : |
**Important Notes** | **Important Notes** | ||
Line 171: | Line 195: | ||
<wrap tip> | <wrap tip> | ||
- | Once your native Avalara integration is configured, you can select it as a service provider when configuring a tax: | + | Once your native Avalara integration is configured, you can select it as a service provider when configuring a tax. |
- | + | ||
- | {{ :v:2.0: | + | |
**Address Validation** | **Address Validation** | ||
Line 230: | Line 252: | ||
" | " | ||
" | " | ||
- | " | + | " |
" | " | ||
{ | { | ||
- | " | + | " |
" | " | ||
" | " | ||
}, | }, | ||
{ | { | ||
- | " | + | " |
" | " | ||
" | " | ||
}, | }, | ||
{ | { | ||
- | " | + | " |
" | " | ||
" | " | ||
Line 253: | Line 275: | ||
</ | </ | ||
- | //**ok**// - show that tax was calculate normally or there is some error. | + | ^ Attribute ^ Description ^ |
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
- | // | + | If you want to return a successful response that has no taxes to display, you can return a payload as follows: |
- | //**name**// - this title will be on cart/checkout page | + | <code json> |
+ | { | ||
+ | " | ||
+ | " | ||
+ | "name": "", | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </code> | ||
- | //**total_amount**// - total tax amount, we will use this amount for calculate total order amount | + | An example of an error response payload is as follows. |
- | // | + | <code json> |
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </code> | ||
- | //**expand_taxes**// - more detail description of applied taxes, should be at least one item. We show it on receipt page and in admin panel. | + | To display taxes //without a % rate// omit the '' |
+ | <code json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
- | This functionality is in beta, and more documentation will come soon. | + | To display 0% taxes, set the rate to '' |
+ | <code json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | === Carts and Transactions === | ||
+ | There are currently the following types of requests, differentiated by a header named '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | There is a separate header to indicate the trigger for the event. Currently we only have one trigger: | ||
+ | * '' | ||
+ | |||
+ | === Starter Code === | ||
+ | |||
+ | Foxy has a Netlify function available for the Custom Tax Endpoint to help you get started. You'll need a [[https:// | ||
+ | |||
+ | The repository provides an example function, which you can tailor to your needs. | ||
===== Current Limitations and Future Improvements ===== | ===== Current Limitations and Future Improvements ===== | ||
Line 273: | Line 360: | ||
Please see the [[# | Please see the [[# | ||
- | ==== Tax-Inclusive Pricing ==== | + | |
- | While there are currently workarounds to get tax-inclusive products, [[http:// | + | |
==== Cumulative Taxes ==== | ==== Cumulative Taxes ==== | ||
- | Though cumulative taxes can almost always be supported (with FoxyCart' | + | Though cumulative taxes can almost always be supported (with FoxyCart' |