Closed wassimk closed 8 years ago
Hi @wassimk
Have you looked in the documentation and examples? https://github.com/taxjar/taxjar-ruby#example-response-2 http://developers.taxjar.com/api/#post-calculate-sales-tax-for-an-order
The response to the /taxes endpoint should include the rate used for each line item. If you have an example request and response please share.
Hey @tonkapark , yes, I've looked, I think I just don't understand the returned rates. More of a tax question now.
The rate is 0.08875. Each line item has the rate broken down in different ways. So district takes more for one item and less for another. But they all add up to 0.08875. I was thinking each line item could possibly have a different aggregated rate. But, it seems this is not true, it will always be 0.08875. That true? So, I can ignore the breakdown and just use the aggregated rate always?
:order_total_amount => 119.96,
:shipping => 14.98,
:taxable_amount => 119.96,
:amount_to_collect => 10.65,
:rate => 0.08875,
:has_nexus => true,
:freight_taxable => true,
:tax_source => "destination",
:breakdown => {
:shipping => {
:taxable_amount => 14.98,
:tax_collectable => 1.33,
:state_amount => 0.6,
:state_sales_tax_rate => 0.04,
:county_amount => 0.0,
:county_tax_rate => 0.0,
:city_amount => 0.67,
:city_tax_rate => 0.045,
:special_district_amount => 0.06,
:special_tax_rate => 0.00375
},
:state_taxable_amount => 119.96,
:state_tax_collectable => 4.8,
:county_taxable_amount => 0.0,
:county_tax_collectable => 0.0,
:city_taxable_amount => 119.96,
:city_tax_collectable => 5.4,
:special_district_taxable_amount => 119.96,
:special_district_tax_collectable => 0.45,
:line_items => [
[0] {
:id => "17471705",
:tax_collectable => 3.99,
:state_taxable_amount => 44.99,
:state_sales_tax_rate => 0.04,
:state_amount => 1.8,
:county_taxable_amount => 0.0,
:county_tax_rate => 0.0,
:county_amount => 0.0,
:city_taxable_amount => 44.99,
:city_tax_rate => 0.045,
:city_amount => 2.02,
:special_district_taxable_amount => 44.99,
:special_tax_rate => 0.00375,
:special_district_amount => 0.17
},
[1] {
:id => "17471706",
:tax_collectable => 3.55,
:state_taxable_amount => 39.99,
:state_sales_tax_rate => 0.04,
:state_amount => 1.6,
:county_taxable_amount => 0.0,
:county_tax_rate => 0.0,
:county_amount => 0.0,
:city_taxable_amount => 39.99,
:city_tax_rate => 0.045,
:city_amount => 1.8,
:special_district_taxable_amount => 39.99,
:special_tax_rate => 0.00375,
:special_district_amount => 0.15
},
[2] {
:id => "17471704",
:tax_collectable => 1.78,
:state_taxable_amount => 20.0,
:state_sales_tax_rate => 0.04,
:state_amount => 0.8,
:county_taxable_amount => 0.0,
:county_tax_rate => 0.0,
:county_amount => 0.0,
:city_taxable_amount => 20.0,
:city_tax_rate => 0.045,
:city_amount => 0.9,
:special_district_taxable_amount => 20.0,
:special_tax_rate => 0.00375,
:special_district_amount => 0.08
}
]
}
}
@wassimk The line items can have different rates if they happen to fall into a reduced rate category like clothing in some states. So I would recommend if you must show the rate used you might have to show it at the line item level if you are passing in the product_tax_code. If you are not using the product_tax_code then you can just show the "rate" at the top level.
I need the overall effective percentage rate per line item for my order management system. I was going to add it in a fork. Any thoughts why I shouldn't do this? I'm thinking it wasn't included for some tax reason?
To add more notes: I see in the response object I have an aggregated
rate
. My question is let's say one of the line item is for a prescription drug and the tax rate is different than the line item for syringes. This aggregated amount won't be quite rate. Technically I have different tax rates per line item. I'm looking to find out that aggregated rate per line item. Is this even possible? Thoughts?