Jump to content
Larry Ullman's Book Forums

Recommended Posts

Thanks for the nice words! I really appreciate it. For the taxes, the easiest, most foolproof solution is to use a third-party tax calculation service wherein you send them--via an API--the amount, origination address, and destination address, and it returns the taxes to charge.

Link to comment
Share on other sites

  • 4 weeks later...

I may add you only need to add tax to purchases from same state. If the person lives in a different state than you you do not need to add sales tax.

 

If you only have locations in one state you can just add thst % to sale if their shipping address is same as your state.

 

Say you are in Massachusetts and you have a 2.5% sales tax.

 

IF ( $shipping_address_state == 'MA' ) {

$tax_rate = 0.025; // move decimal 2 places to left.

$sub_total = $100.00; // total price of order.

$tax_total = $sub_total * $tax_rate; // total amount of tax.

$order_total = $sub_total + $tax_total; // total price including tax.

}

Link to comment
Share on other sites

I don't think it's that cut-and-dry. There's the "physical presence" law, to which you refer: The current default rule throughout the United States is that you must collect sales tax on Internet sales to customers in those states where your business has a physical presence. However, many states use a broader "nexus" law, which is why, for example, Amazon charges me sales tax even though they don't have a physical presence in my state (as far as I know). There are also different laws for different types of products. For example, virtual goods vs. physical goods. And then many jurisdictions don't tax certain items, like food, clothing, or Bibles. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...