How can I export the refund amount in the shop's currency?

The refund transaction data in the Shopify order only provides the amount in the customer's currency.

A workaround to get the refund amount in the shop's currency is to use this formula via EZ Exporter's Calculated Fields feature:

{{ total_price }} - {{ current_total_price }}

The current_total_price is a relatively new API field that reflects refunds and order edits.  Both these fields in the formula are in the shop's currency, so subtracting current_total_price from the original total_price will give us the refund amount in the shop's currency.

Another workaround is to look at one of the price fields in the order data that contain both the prices in the shop's currency and the customer's local currency to figure out the exchange rate when the order was placed.

The formula below will multiply the exchange rate (customer currency to shop currency) with the refund transaction amount to get the price in the shop currency:

round_half_up(({{ refunds.transactions.total_amount }} or 0) * (float(get_attribute_value({{ total_price_set.shop_money }}, "amount")) / float(get_attribute_value({{ total_price_set.presentment_money }}, "amount"))), 2)

Related Articles:


App: EZ Exporter

Tags: refunds, shopify orders, currency conversion