I’m refunding an order via the Shopify dashboard, and I noticed a network call being made to an endpoint named MultiCurrencyConversion. However, I haven’t been able to find any documentation regarding this endpoint.
This is exactly the functionality I need for my backend to determine the correct refund amounts in different currencies. Could someone help point me to the appropriate documentation or guide me on how to use this endpoint?
We’re sending refunds from our own dashboard and we need to explicitly say what the refund amount will be in USD. For example, if there is an order in CAD but the store currency is USD, we would need to show the refund amount in CAD and the USD like it does when you refund an order via Shopify.
I’ve tried using the suggested refund endpoint, but it looks like the amount in USD doesn’t match exactly with the amount that’s shown when you try to refund the order through Shopify.
Got it. Thanks for the example scenario - that’s super helpful.
I’m still a bit confused on why you need to convert in the first place. Orders no longer contain a total_price_usd field, which has been the case for over a year I think.
Instead, orders should inherit the store’s currency settings as part of the order.totalPriceSet.shopMoney field.
Thanks for the response! We often deal with partial refunds which is why we need the exchange rate. I’ve tried using totalPriceSet before to get the exchange rate (presentment_money / shop_money), but this exchange rate differs to the one used in Shopify’s refund dashboard. I assume this is because the amounts in totalPriceSet remain constant whereas Shopify uses an updated rate on the day of the refund.
I think you’re probably spot on there. The order.totalPriceSet is probably set during the time of the transaction.
Now I fully understand the problem and why you’re looking for an undocumented rate exchange API, seems like a crucial piece to fully support partial refunds.
In the past, I used the OpenExchangeRate API to perform conversions, I’d cache the data for a reasonable amount of time to help with usage.