GraphQL API Order Shipping and Shipping Tax

Amichay
Excursionist
23 0 1

We are fetching orders via GraphQL,

One of our clients pointed out that the order shipping amount (order.totalShippingPriceSet) is not match to the UI value.

Did some digging and we pretty sure that we found the reason, please confirm and help to solve.

 

We found out that order.totalShippingPriceSet is including the shipping tax. 

The problem is that both order.totalShippingPriceSet and order.totalTaxSet contains the shipping tax value and it affect our calculations.

 

for example,

Order ID: 2455698014257

Shop ID: passenger-clothing-com

 

Shipping amount: UI -  2.92 | API - 3.5 -> difference of 0.58

Taxes amount:  UI -  2.74 | API - 2.74

 

by querying the order.shippingLines.originalPriceSet and order.shippingLines.taxLines.priceSet we can confirm the case:

order.shippingLines.taxLines.priceSet is 0.58 (as UI/API Shipping amount difference)

order.shippingLines.originalPriceSet is 3.5 (as order.totalShippingPriceSet)

We think that even though that the description of order.shippingLines.originalPriceSet is "The pre-tax shipping price..." it do contain the shipping tax.


(also confirmed that order.totalTaxSet contains order.shippingLines.taxLines.priceSet by querying the order.lineItems.taxLines - it is the sum of the two...)


Please investigate,

and please add a new total field for the order node for the shipping tax - order.totalShippingTaxPriceSet - it will simplify getting this data, because for now we getting it in a separate JSONL...

0 Likes