I think you’re overestimating that rate, and by quite a bit. Mastercard’s fees seem to be between 0.2%-1.65%[0] depending on the card and transaction type.
I didn’t bother to look for Visa’s rate, but I’d imagine it’d be similar.
[0]https://www.mastercard.co.uk/en-gb/about-mastercard/what-we-...