Multi-currency Returns

Solved

Multi-currency Returns

Piam
Shopify Partner
25 1 11
I'm having a problem extracting the return amount from an Order.
 
For this scenario, a Customer places an online order in USD (and the Shop has shop_currency=USD).
After a few weeks, the Customer returns a few line items in the Order at a Point of sale. This triggers an order/updated event and populates the "refund_line_items" array on the Order, but the transaction is another currency (EUR).
 
I've been using the Refund resources' Transaction data to calculate the return, but this does not work when the currency on the Transaction in the Refund does not match the Shop's currency.
 
What is the right way to determine the full amount of returns on an Order in the same currency as the Shop's currency? 
Cofounder, By the Numbers
(https://apps.shopify.com/by-the-numbers)
piam@bythenumbersapp.com
Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1453 238 512

This is an accepted solution.

Hi @Piam - thanks for reaching out. At the moment, you are correct in pointing out that the currency may not match the shop's currency in the refund resource/object's transaction history data when queried via the API. You can pull transaction information directly on the order object though and have it display in the shop's currency by using the in_shop_currency=true parameter/value. This will also display refund transactions in the shop's currency. 

Hope this helps - let us know if we can clarify anything further on our end. 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

View solution in original post

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 238 512

This is an accepted solution.

Hi @Piam - thanks for reaching out. At the moment, you are correct in pointing out that the currency may not match the shop's currency in the refund resource/object's transaction history data when queried via the API. You can pull transaction information directly on the order object though and have it display in the shop's currency by using the in_shop_currency=true parameter/value. This will also display refund transactions in the shop's currency. 

Hope this helps - let us know if we can clarify anything further on our end. 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

Piam
Shopify Partner
25 1 11

We implemented tested and deployed this and it works exactly as advertised.

Thank you!

 

--Piam

Cofounder, By the Numbers
(https://apps.shopify.com/by-the-numbers)
piam@bythenumbersapp.com