With new requirements in Colorado taking effect soon, it will be required for online retailers to now collect based on delivery address.

This means that for every order an API request needs to be made with the address as the request data and a breakdown of tax jurisdictions with rates as the JSON response.

{"totalRate":0.049850,"rates":[{"rate":0.029000,"name":"CO STATE TAX","type":"State"},{"rate":0.009850,"name":"CO COUNTY TAX","type":"County"},{"rate":0.010000,"name":"CO SPECIAL TAX","type":"Special"},{"rate":0.001000,"name":"CO SPECIAL TAX","type":"Special"}]}

When I have looked at working on this previously a number of years ago, I ended up creating Magento Tax Zone/Rates on-the-fly with the ID of each mapped to the Zip5+4 of the customer's address as provided by a separate call to the USPS address validation API. This was a terrible solution in practice and wasn't fit for production use.

Have any changes been made to Magento's Core which allow a simpler way of completely ignoring the built-in Tax models and simply applying a sales tax rate dynamically with a single API call during checkout?

I know there are various paid solutions and varying qualities of third-party extensions/integrations. These often do not meet the requirements of Colorado and/or are paid monthly subscriptions which is not what I am interested in.


What we have done in Magento2, which should mostly also work in M1, is setting the customer tax class dynamically (normally defined in the customer group) based on the shipping address. This way you can have a completely different set of tax rules for the customer tax classes and mostly still use the default tax calculation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.