Transaction fees are paid regardless of whether an order is fulfilled or cancelled or returned because it is a cost related to processing the transaction. A transaction continues to exist even when an order is cancelled and refunded. It is a process and has a cost. Whatever becomes of the order, those fees are spent and should be calculated as part of your overhead for online transactions.
LifeinAsia
6:29 pm on Jul 9, 2021 (gmt 0)
In the past, I seem to remember that PayPal would refund the fees for transactions that didn't involve a credit card (i.e., transfers between PayPal accounts when funded by an existing balance). And (I think), at least in the beginning, the CC processor I used to use would also refund the transaction fees when doing refunds. But those are definitely the exceptions and most likely they don't do it any longer.
For Shopify or other platforms that add another layer on top of the processing process, it's unlikely that they're refund the transaction fees. It's probably only a matter of time before they start tacking on transaction fees to the refund side as well.