Development discussions around Shopify APIs
When I create an order without tax_lines, but with a shipping_address (including country code and province_code), there is no tax in the created order.
Can the tax be auto-calculated based on the Shopify Admin setting?
Hey @tcmleung
You can use the Draft Order Endpoint if you want Shopify to calculate the tax on your behalf - it would calculate tax based on the customer address and the items.
You could then complete the Draft Order, which would convert it to an actual order.
I've also noticed the Draft Order API documentation has a mistake (I'll follow up internally about that as an aside) but here are the calls to complete a Draft Order to mark as paid/or pending. Hope that helps!
Complete and mark as paidPUT /admin/api/{api_version}/draft_orders/{draft_order_id}/complete.json
Complete and mark as pendingPUT /admin/api/{api_version}/draft_orders/{draft_order_id}/complete.json?payment_pending=true
Hope this helps!
User | RANK |
---|---|
6 | |
5 | |
5 | |
5 | |
4 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022