Reaching out to the community about a query about the Shopify API as I didnt get full clarity from the documentation.
Im reaching out regarding the tax_lines attribute (specifically Im looking at a case of tax_lines for a shipping_line item for an order but Im guessing all tax_lines work the same?)
I saw a shipping line of amount 18 with two tax_lines. They were :
1. title : 'HST', rate: 0.13, price: 1.69
2. title : 'HST', rate: 0.13, price: 0.65
Doing some math, can see that neither of those line prices is 13% of $18, but their sum (2.34) is correct. When asked I was told that one of the lines was the tax on the amount charged but the postal service, and one of the lines was the tax charged on the handling fee.
This is the first time Im seeing multiple tax line with same title, same rate, but different amounts. Is it expected that if there are multiple lines then all of them with same title have to be grouped?
Cause I have seen other cases where there are multiple tax_lines cause of multiple taxes, like example
one line with title - "GST", rate - "0.07" and
a second line with title - "State Tax" , rate - "0.1"
so its a total tax rate of 0.17 applied on the whole line.
I guess my question is how do I know the total tax rate applied on the line. I used to just sum up tax rates of each line, but after this case it looks incorrect.
Is it correct for me to say that if I sum tax rate of each "unique tax (title)" I will get the total tax rate applied on the line?