Just to let folks know. Sadly this is normal practice. You are technically being credited back the credit card transaction fees when you cancel an order, but you are being charged them again on the refund transaction as an interchange fee from the banking system. This is essentially a policy laid down by the banking institutions which the credit card companies utilize and unless the merchant gateway processing the transactions has some kind of special contract agreement with Visa/Mastercard/etc, those fees are charged right from the source. As much as I hate Shopify and their horrific mismanagement of many things and their absolutely laughable support, I will attest that it’s not actually them pocketing the fees in this instance. If you do a little more research on Google, you will find several articles relating to this (which are not Shopify sourced), which do lay out this practice in detail.
It is a completely rotten practice to keep fees on a transaction that essentially didn’t happen, which is shielded by a paper thin excuse of “paying for the infrastructure” which is BS. It’s just another banking system cash grab, just like charging $15 for charge backs. The only solution is to band together and bug the hell out of our government reps to revise these systems. Banks like to claim that they are “partners in our business” but as soon as it comes down to it, they run away with the bag at the first sign of loss. The banks should be required to actually act as partners and shoulder the same setbacks.