We are calling the calculate refund API
before calling the create refund API
It is working fine but today, the calculate API did return the transactions object empty in the response.
Therefore we can not refund the order.
Do you have any idea what can be the reason?
Thanks in advance
Solved! Go to the solution
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
This is an accepted solution.
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.
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
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.
We are making this API call on behalf of our merchants. This issue does impact their daily operations. Please advise.
Thank you very much!