Does the module support taxing the shipping?

Created on 18 March 2022, about 3 years ago
Updated 14 May 2025, 8 days ago

Problem/Motivation

The Taxjar Api has the shipping cost as required value, but looking to the request, I noticed that the shipping is always 0, and even if I test sending a different value for the shipping, the module seems to only take the information from the "line_items" part of the "breakdown" section of the response.

However, this is only the tax for the items not the "amount_to_collect" part of the response that includes the shipping tax.

I'm unsure of whether this is the expected behavior or if it should tax the shipping cost and it is not working as expected.

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    The module does send the shipping cost to Taxjar, but I honestly don't know how that gets handled on the Taxjar end.

    Do you know of a jurisdiction in which shipping is taxable, so that we could test it?

  • πŸ‡ΊπŸ‡ΈUnited States pnigro

    Thank you aaronbauman for working on this module. Based on TaxJar, the following currently charge sales tax on shipping.

    Arkansas
    Connecticut
    District of Columbia
    Georgia
    Hawaii
    Illinois
    Indiana
    Kentucky
    Louisiana
    Minnesota
    Mississippi
    Nebraska
    New Jersey
    New Mexico
    New York
    North Carolina
    North Dakota
    Ohio
    Pennsylvania
    Rhode Island
    South Carolina
    South Dakota
    Tennessee
    Texas
    Vermont
    Washington
    Wisconsin
    West Virginia

    I created an order with an Illinois shipping address and the shipping was not taxed. The tax rate is 10%. With shipping, the total tax should be $750.76. Please see attachment.

    Thank you,
    Paul

  • πŸ‡ΊπŸ‡ΈUnited States pnigro

    It looks like $adjustments is returning an empty array in the buildRequest method.

        $adjustments = $order->getAdjustments();
    
        foreach ($adjustments as $adjustment) {
          if ($adjustment->getType() === 'shipping') {
            $request_body['shipping'] += $adjustment->getAmount()?->getNumber() ?? 0;
          }
        }
    

    What's strange is that a shipping adjustment is attached to the order on the order edit form. Please see attached.

    Thank you,
    Paul

Production build 0.71.5 2024