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.
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.
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?
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.
Any chance you could share the JSON you're using, or spot what's wrong with mine? I used this:
"address1": "287 Mather Street",
"country": "United States",
POSTed to ....myshopify.com/admin/orders.json
(which successfully created an order, but w/o tax)
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.