We have a live Shopify app.
We were using total_price_usd property in the Order REST API for our app functionality. However, now total_price_usd is deprecated.
How else can I get the USD price from the order details?
Any pointers would be appreciated.
Thanks in advance
Our app has the same issue as it charges a percentage-based commission on certain orders. The commission is charged using the UsageCharge resource, which always assumes the price field is in USD, while the order amounts are in the store currency. We have used the total_price_usd for currency conversion.
Shopify makes currency conversions all the time, so how could we access these conversion functions, if the USD value for orders has to be deprecated?
Yes, I got an answer in this thread but in short, they are considering adding some new feature to help with currency conversions. Meanwhile, we made a quick workaround to this problem by parsing this currencies.js file that Shopify provides in to a local database and using that to convert the sums to and from USD.