Comments (3)
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.
from taxjar-ruby.
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
}
]
}
}
from taxjar-ruby.
@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.
from taxjar-ruby.
Related Issues (20)
- Calculate Sales Tax for a Saas based product without shipping HOT 1
- Support for Ruby 1.9.3 HOT 1
- How does the the dependency on model_attributes work? HOT 2
- Unable to parse invalid JSON when service unavailable HOT 4
- Occasional InternalServerError on address validation HOT 1
- HTTP::Error: Unknown MIME type: text/html in rare cases HOT 2
- Stripe Subscription Integration Questions HOT 6
- Support for ruby 2.7 HOT 6
- Client doesn't throw Taxjar exceptions during outage
- Client doesn't throw Taxjar exceptions during outage HOT 1
- Cannot create customer with the API HOT 1
- Taxjar::Client#show_order is supposed to return exemption_type but does not. HOT 2
- http dependency bump for ARM support? HOT 1
- Different states tax calculation HOT 1
- 2000 dodge
- default User-Agent can cause 500 errors HOT 1
- Bump http gem dependency to support v5 HOT 1
- Support for API versions; gem should upgrade before it is forced HOT 1
- Missing v.3.0.3 tag, so can't see the diff in GitHub HOT 1
- Taxjar::Base has confusing mixed data states
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taxjar-ruby.