Order and item amounts

Three questions about the values returned in the order API response:

  1. It appears the order item values for unitPrice, tax and discount need to be integers. Is this correct? And if so, it is appropriate to assume the values are in cents (at least when the currency is USD)? And does this apply to the order subTotal, discountTotal, taxTotal and netTotal attributes as well?

  2. Is the order item unitPrice inclusive of the discount or should discount be subtracted from unitPrice to get the net sales amount for an item?

  3. Similar question for discount on order - is the discountTotal included in the order subTotal or in the order netTotal? I found documentation that indicates taxTotal is included in netTotal. If I apply this to discount, then subTotal would not include the discountTotal, but netTotal would. Is that correct?

Thanks!

Hi Peter,

Sorry we have not had a chance to respond to your question earlier. Have you figured it out or you still need the answer? I can follow up later today to clarify.

Hi Dennis - no worries. I’ve looked at test data and written the aggregation code for our polling process, but would be great to get your perspective. We want to make sure we’re aggregating the data properly.

Peter,

#1 - yes
#2 - unitPrice does not include discount
#3: this is the formula we use in calculating netTotal:

netTotal = subTotal + taxTotal - discountTotal + cashback

1 Like