Order line_items price always before tax?

Wolxhound
New Member
2 0 0

Hi,

Just want some confirmation on the price field that appears against the line_items section of the orders response. Will this price always be the price of the item before any tax has been applied to it? Or are there options within Shopify that would change this price to include the tax?

Thanks in advance

0 Likes
_JB
Shopify Staff
Shopify Staff
822 97 178

Hey @Wolxhound,

Yes Shopify offers a setting for stores located in countries where it's required to display the price with tax included. When this setting is enabled the price field on order.line_item includes tax for taxable items. You can call the shop.json endpoint and reference the "taxes_included" field to determine if this setting is enabled.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
Wolxhound
New Member
2 0 0

Hi @_JB 

Thanks for your reply, just to confirm, does the taxes_included field that you're talking about match the taxes_included field that's returned in the orders response?

If so, I can take it that:

taxes_included = true & item taxable = true -> price field is the price after taxes have been applied

Any other combination of these fields would always result in the price field always being before the tax value?

Also, sorry to diverge a little, but if discounts are being applied to an item I've seen that it can affect the way that the tax amount is calculated when the price field is before taxes. I've seen that it looks like you do (price - discount) * tax_rate to get the tax amount (rather than discount being taken off the gross value of the item).

If the price field includes the tax value, is discount still applied to the pre-tax value of the item? Or does the discount just come off the price field, regardless of whether this is net or gross value?

0 Likes