Still looking for possible solutions on this, any response or indication to a similar issue will be appreciated.
I am actually just going to implement the very same thing and the only solution which came to my mind is to:
--> get the transactions related to the order (GET Transactions for specific orderId)
--> in case there are multiple gateways used (giftcard, creditcard...) decide which one I wanna refund at first.
--> send the initial refund to the "prioritized" gateway (transaction.Kind = "refund", transaction.parentId=<giftcardID OR captureTransactionID)
--> send the rest of the refund to the other gateway
If there is some better solution, preferably using the standard "calculate" endpoint, it would be nice to know.
we have the exact same issue, it is interesting that Shopify defaults to the refund on the gift card instead to the other payment methods which seems more logical.
We are probably going to implement it as NekomGmbH described... since this triggers money transactions, it would be really nice if Shopify could offer an easier and less error-prone solution here.
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022