Order discount discrepancy? How it could be calculate from REST API order or line items data?

New Member
1 0 0

Hi! Could one please explain how "Discounts" are calculated for taxable orders?

For example - there is an order:

GDS Gross salesDiscountsReturnsNet salesShippingTaxTotal sales


The order itself has a "fixed_amount" discount of 20 euros and the following line items:

pricetax ratetax pricepre_tax_pricediscount_allocations


As I understand - with this type of discount "discount_allocations" are calculated as a proportional value of a total discount to the line item price.

And total discount would be a sum of "discount_allocations"/(1+"tax rate"). And it should be 16$.


But Shopify says it is 15.06$ !

This is a huge difference! How a euro got lost on Shopify calculations?