FROM CACHE - en_header

Refunds calculation for a timeframe using APIs

Shopify Partner
2 0 0

Hi there, 

I am developing a Shopify app where I need to make sure the data in my app matches the data in the Shopify Analytics Dashboard. I'm facing problems when calculating refunds. I'm not sure what is the correct way of calculating Shopify refunds? I'm looping through the order's refunds array and adding the transaction amount but it doesn't help always. Similarly, I loop through the order's refund line items array and add the subtotal value but it doesn't work as well.

I'm confused about when to consider refund line items array subtotal value and when to not? 

Or if you have some other way of calculating refunds it will be highly appreciated. 

Thank you in advance.

Replies 0 (0)