Development discussions around Shopify APIs
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.
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.
CS | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
As a business owner, have you ever wondered when your customer's first impression of yo...By Skye Jun 6, 2023
We're excited to announce improvements to the threaded messaging experience in our communi...By TyW May 31, 2023
Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...By Jacqui May 30, 2023