Calculate Refund API doesn't returning Transactions object

Solved
Highlighted
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 (Retired)
Shopify Staff (Retired)
624 102 127

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
Tourist
6 1 1

This is an accepted solution.

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
Highlighted
Tourist
10 0 1

Hi @hassain ,

We have a similar case, there is a refund but no transaction. And Shopify sales report does not consider this refund as a refund and this refund is subtracted from the gross total 

 

What happened was 3 items were purchased and paid via PayPal on 29th July ... order was edited on 6th August to remove one of the item (refund I guess) but gross sales only  considers the line items that were fulfilled not the line items that are in the line_items array

 

Request ID : 863fe6b5-c4c6-4a09-b810-f0522b1e3eab

 

Hoping to hear back from you! Thanks

0 Likes
Highlighted
Tourist
10 0 1

Hi @Kevin_A 

Would you help me with this?

0 Likes
Highlighted
New Member
2 0 1

Hi @hassain 

Neither of the cases you mentioned fit my scene. The order that I am trying to refund has a postive-value item and it is NOT refunded yet. Please help check why the transactions array is empty. The x-request-id is as below.

d6cb0845-6d12-4c78-91df-5a286417ae84

We are making this API call on behalf of our merchants. This issue does impact their daily operations. Please advise.

Thank you very much!

1 Like
Highlighted
Tourist
10 0 1

@victorzhou It seems that we have the same case and @hassain is not an active account it seems. I have sent them a ticket about it and it has been 3 weeks and nobody answers. Their chat support, unfortunately, has no clue. If you get an answer then please update this thread.

1 Like