Calculate Refund API doesn't returning Transactions object

Solved
Tourist
6 1 1

We are calling the calculate refund API 

https://help.shopify.com/en/api/reference/orders/refund#calculate-2019-07

before calling the create refund API

https://help.shopify.com/en/api/reference/orders/refund#create-2019-07

 

It is working fine but today, the calculate API did return the transactions object empty in the response. 

{"refund":{"shipping":{"amount":"0.00","tax":"0.00","maximum_refundable":"0.00"},"refund_line_items":[],"transactions":[],"currency":"EUR"}}

Therefore we can not refund the order.

 

Do you have any idea what can be the reason?

 

Thanks in advance

0 Likes
Highlighted
Shopify Staff
Shopify Staff
426 57 65

Hey @birben ,

 

A couple of reason why you may be getting an empty transaction object could be if the order you are trying to refund was worth $0.00 (i.e. the customer purchased a free item). In that case no transaction would exist and therefore the transaction object would be empty. Another possibility would be if the order was already refunded or cancelled in the first place.

 

If neither of these cases apply to you, feel free to send me the value of the X-Request-ID in the header of the API response from Shopify that returns the calculated refund with an empty transaction object

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

1 Like
Highlighted

Success.

Tourist
6 1 1

Hey @hassain 

 

Thanks for the reply, we figured out that the problem was about the order itself. It was not an API related issue. Our Customer Experience team resolved it.

 

Cheers

0 Likes