Giter Club home page Giter Club logo

Comments (3)

tonkapark avatar tonkapark commented on May 26, 2024

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.

wassimk avatar wassimk commented on May 26, 2024

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.

tonkapark avatar tonkapark commented on May 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.