MarketPress Calculate Sales Tax

Correct me if I’m wrong – I hope that I am, or that there is a buddy plugin to use – but if I’m using Marketpress there is no way to calculate sales tax per state or only charge a set/flat rate of sales tax if the purchaser is from a certain state – otherwise not charge a sales tax. Is there any flexibility in sales tax or a way around sales tax issues? My client is going to have an online store and sell to all 50 states…



  • Arun Basil Lal
    • New Recruit

    Hey Kate,

    I am not from US, I had a chat with Mason, who happens to be from US and knows quite a bit about this.

    I understand that, for online purchases, if the user is from a different state as the seller, you don’t have to pay sales tax. That’s how it is supposed to work, right?

    In that case, this would work perfectly. Am sure Aaron has taken care of it that way.

    Let me know! Thanks!

  • kparberry
    • WPMU DEV Initiate

    The plot thickens – they have a sales base in Colorado, Michigan and Texas. So I need to be able to charge sales tax to any user from those three states (and they probably have to have a different tax rate for each as well)… Any thoughts?

    Otherwise you are saying if the seller is Colorado and the user is as well, then just enter COlorado as the base state and the tax rate in settings and I’m good to go.

  • Paul
    • The Green Incsub

    @arun, You are correct mostly that you do not have to collect sales tax for online good. There is something also called same-state sales tax which is supposed to be collected but this does not apply to for online simple shopping cart sales. Meaning this was a carry over from pre-online days. I grey up on the Texas-Louisiana border on the Texas side. If I made a purchase for example at Best But I paid the 7.5% sales tax. But if I instead had it shipped to an address in Louisiana I paid 0% sales tax. (I would then get charge shipping but different issue.

    @kparberry, In a few works I would say MarketPress is not able to do by-state tax variations. The way MarketPress works currently is this. If base status from Store Settings > Location Settings and the buyer’s ship-to state are the same taxes will be added to the order.

    So for example I’ve set my Store Settings state to Texas and enter a tax rate

    During the checkout of some dummy widget here are two screen showing shipping to Texas ( ) vs North Carolina ( ) Maybe some day soon MarketPress be mature enough to rival Magento and some of the single focus eCommerce engines.

  • Paul
    • The Green Incsub

    @aristath thanks for the assist. The tax logic is outside of the shipping gateway logic. Actually part of core. But yeah, I think the solution would be to externalize this like the shipping or payment gateways. I don’t there there will be use one since MarketPress seems to be used internationally not just in the US. Even just for the US I know of existing contacts using other eCommerce engines but wanting city and country taxation logic. Crazy. I’ve worked in Magento and other engines. Heck I’ve rolled my own since the early 1990s. It is hard to solve everyone’s needs.

  • aristath
    • Recruit

    Yes, I agree… For @kparberry‘s case I was just thinking of cloning his shipping gateway, renaming and altering a few things, just in order to solve his problem fast and without any other complications.

    The reason I suggested the shipping module is because it seems easier to put in there a conditional for some states and do some math on the prices…

    There’s no way to keep everybody pleased!!! There will always be some amount of customizations and “hacks”, it’s just a matter of finding the most efficient and modular way to achieve it.

  • daniel_murphy
    • New Recruit

    I understand that setting taxes per state/province may be a long ways down the road. But I think it should be a simple feature to add so that the store owner can select whether or not to apply taxes for all states, or only if the “ship to” state is the same as the store’s state.

    I am trying to modify my existing marketpress plugin, but I’m having trouble getting the mp_settings (field in the database under the options table) to include an option for “tax_all_states”. I think it has something to do with the plugin version number. Apart from that, I think i figured out how the functionality would work once the radio buttons are in place and the store settings option for “tax_all_states” is added in the database.

    Can someone please tell me how I would add a new option in the mp_settings field?

    I would be happy to post my solution once I’ve got it working.

    Notice in the code below I’m trying to add an option “tax_all_states” that would be used as radio buttons.

    //our default settings
    $default_settings = array (
    'base_country' => 'US',
    'tax' => array (
    'rate' => 0,
    'tax_shipping' => 1,
    'tax_inclusive' => 0,
    'tax_all_states' => 0,
    'tax_digital' => 1,
    'downloadable_address' => 0

  • Dev4
    • Champion of Loops

    It seems like @aristath s idea about cloning the shipping plug in would be the quickest way to get something working for this.

    For those who wonder why taxes work this way here… I can explain.

    (if you don’t care just skip to the next message)

    Each state government can set it’s own tax rates, but they cannot force a company in another state to collect the tax for them. Each state con only force companies that do business in their states to collect taxes. States also cannot collect taxes on sales that happen in other states because the US constitution does not allow states to control or tax commerce between the states

    So if a company does business in 4 states, they have to collect taxes for sales in those states and no other states.

    But that does not mean there are no taxes for interstate sales. The taxes are still supposed to be paid by the purchaser in their own state… but this does not happen often.. most people do not report their interstate purchases.

    Wow.. a US tax lesson on a dev support site… who would have known… lol

  • Dev4
    • Champion of Loops


    How would tax all states work? I mean in the real world.

    It would kill sales in states without sales tax… people would consider it a rip off

    Each state has it’s own tax rate, and some have 0

    On second thought… maybe the solution is right there.

    If tax all states is set, and there is a table for state rates, then set all to zero that should not collect taxes… that could work!


  • Lex
    • Flash Drive

    Aaron / Dev4,

    I’m working on a similar issue at this point.

    NY Tax Law requires separate taxes for each county…

    So I have the same approach

    'tax' => array (
    'rate' => 0,
    'tax_shipping' => 1,
    'tax_inclusive' => 0,
    'tax_digital' => 1,
    'tax_special' => 0,
    'downloadable_address' => 0

    Where tax_special will allow additional field for tax_special_amount

    Aaron, could you please give more details on what you mean by: You just have to save it from settings.

    Also, how do I add these fields to the database? Can you please pinpoint some example or documentation on this.


  • daniel_murphy
    • New Recruit

    Well – I have a customer (my first one!) who would ideally like to set up taxes for different states as Nebraska state law requires. Until that is possible, the customer would like to collect taxes for all states. I am not a tax lawyer. I only mentioned to my customer that I think you are not required to tax revenue from outside states. But I’m not going to argue. I only want to provide my customer an option.

    Lex and I have a similar questions. How can we add ad options for this plugin? I know all the options are stored in a single database entry – unlike typical database settings.

    Aaron – If the default settings don’t matter much, then where else would I add an option?

    I’m not much of a back-end code. But I do realize that my code will be overwritten once I upgrade.

  • p3ctech
    • Flash Drive

    For the WPDEVMU developers, take a look at the product TaxNow which utilizes Avalara’s Avatax APIs to calculate sales tax for every state in the US.

    Note that sales tax is not a simple matter. It can vary based upon the delivered to location. Different county’s within the states levy additional taxes besides the state sales tax. Right now, online retailers only have to collect sales tax in states where they have a physical presence. But that is likely going to change if Congress pushes through the new legislation related to sales tax for online retailers with over $1MM in revenue.

    That said – WPDEVMU – take a look here at this example of integration with WP E-Commerce and sales tax calculation services:

    P3C Technologies LLC

  • leeanne_egge
    • WPMU DEV Initiate

    I too am interested in this. Washington state, where many of my clients are located, has a destination based sales tax. I have developed a plugin for another wordpress ecommerce plugin that takes the customer’s shipping address and zip code and gets the appropriate tax rate from the state DOR sales tax API. All I would need is to see the API action hooks for getting the shipping address from Marketpress and updating the tax rate for the cart — and I can probably adapt this plugin for Marketpress. So, where is the API documentation for Marketpress? Is there any?

  • Bob
    • Design Lord, Child of Thor

    I’m in the early stages of building an etsy style site but I’m concerned with this issue. I know there has been lots of debate about this and some state legislation, so I thought I’d ask: As of May 2014, what is the requirement on collecting sales tax for internet sales and does WPMU have a way of automating it. I’m gonna be using Paypal chained paymnets.


  • Vaughan
    • Support/SLS MockingJay

    Hi @bob,

    This is a very old thread, you would have been better opening a new thread.

    Marketpress has the ability to allow you to set prices inclusive of Tax, or it will be added on afterwards seperately.

    However, currently you can’t have different tax rates for different regions/states.

    I think this functionality might be in the new 3.0 version once it’s released, but I can’t provide an ETA on when that will be.

    Hope this helps

  • Dev4
    • Champion of Loops


    My 2cents for what it is worth.

    Of course i am not an accountant or a lawyer, but i can tell you that as i understand it you have to collect sales tax in any state that you have a physical business presence in. So if you have an office or a warehouse in a state you need to follow their laws re state taxes. You really should be talking to lawyers and accountants about this to be sure… But for an etsy style site those same ideas would apply to your shop owners. They are the merchants so they would have to charge taxes to people in the states they do business in.

    But again, talk to your accountant about these questions.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.