How to send even line item unit price

New Member
4 0 0


I am currently facing a challenge with sending line items over to shopify. In this example I purchased a single item with a quantity of 3 for 5 dollars. The line item price should be 1.6666666666666666666666666666667, but when I send this to Shopfiy's Order's API they round it to 1.67 thus showing an incorrect grand total. Instead of $5 shopify reads $5.01 since they're rounding the price values sent to them from an external source (kind of dumb if you ask me). They should do the calculation and round the final result, not round the inputs before calculation is done.

Is there any current work-around for this? It screams "BUG" to me since their API is manipulating line_item inputs without consideration that those values have to be accepted exactly as they are sent. Since I cannot get proper price sent over I am subjected to legal issues since Shopify is sending an invalid order confirmation email with a price they derived on their own without letting me set my prices.

Reply 1 (1)

Shopify Staff (Retired)
267 40 51

Hi @Leif_Leroy 

This is a current limitation of how discounted line items are rounded, I understand it is not behaving how you expected it to. Thanks for letting us know how this affects you - I will pass this along to our product team for future consideration.


To learn more visit the Shopify Help Center or the Community Blog.