Hi.
I’m using the refunds api to refund payments linked to a specific order.
I see that the refund is successful (in sandbox mode) in the sense that I see it appear in the square dashboard.
Since the payments I refund are all linked with an order, I would also expect to see a object appear in the orders for which payments have been refunded, though I do not. It is therefore very difficult for me to see which orders have been refunded.
Is this the expected behavior of the refund API? Do I need to specify additional information during the refund call for it to appear in the order object? If so, what would be an efficient way to see which orders have been refunded?
In the refund object there is the order_id
. If you RetrieveOrder with that ID the response will have the source_order_id
which is the originating order from the payment.
Not sure I understand your answer. Let me be clearer.
Once I refund a payment linked to an order, when I retrieve the order in question, will I be able to see a trace of the refund in the “refunds” property of the order object?
Okay, thank for the additional explanation. Yes, the order will have the refund in the order object.
Well, the thing is that in my case, it is not.
When I retrieve the refund itself, I see it has an order_id
property with the id of the order to which it is linked. However, when I retrieve this same order, no sign of a refunds
property.
Would you mind providing the order_id
that you are seeing this with?