Calculating Sales Tax on orders created by the Shopify API

Damon_Wilson
Shopify Partner
7 0 1

From the research I've done its currently not possible to have Shopify calculate the sales tax on orders created with the Order API. Is that right? 

We'd have to calculate sales tax via a 3rd-party API and pass it along with the order on the Shopify API. 

Just wanted to confirm I'm not missing something. 

Thanks! Damon

0 Likes
Damon_Wilson
Shopify Partner
7 0 1

Nothing?

0 Likes
HunkyBill
Shopify Expert
4509 46 492

Tax is dependent on the shipping address of the customer. It has no meaning unless you specify where the order is going. Once you do that, specify a customer, you should see tax added to the subtotal and hence there is no manual tax calculation for you to do. 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Ben_Rachbach
New Member
3 0 0

I think this is incorrect. In my tests, taxes are never automatically added to an order when it is created through the Order API, even if the order shipping address and/or customer address are specified.

(This is in contrast to the new Draft Order API, which does automatically add taxes based on the shipping address.)

Has anyone successfully got the Order API to automatically add taxes?

0 Likes
HunkyBill
Shopify Expert
4509 46 492

Your tests could be wrong... like so many tests. Heck, Shopify tests everything and we know the platform has bugs... all I know is I created an order using the API, and the tax lines were filled in for my order... I guess my tests differ from yours. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Ben_Rachbach
New Member
3 0 0

Any chance you could share the JSON you're using, or spot what's wrong with mine? I used this:

{
  "order": {
    "currency": "USD",
    "line_items": [
        {
          "quantity": 2,
          "variant_id": 10293094659
        }
    ],
    "taxes_included": false,
    "shipping_address": {
      "address1": "287 Mather Street",
      "city": "Oakland",
      "country": "United States",
      "province": "California",
      "zip": "94611"
    }
  }
}

POSTed to ....myshopify.com/admin/orders.json

(which successfully created an order, but w/o tax)

0 Likes
Vytautas_Ziukas
Shopify Partner
1 0 0

HunkyBill, can you share how you creating order and getting taxes added ?

0 Likes
tcmleung
Tourist
9 1 2

Hi, Hunkybill,

 

I also failed. If I create order without tax_lines declared, there will be no tax in the created order.

Can you show me your order json? I want to see what the difference is to make your json to create tax automatically.

Thanks.