Mastercard and Visa have rather corse information about the transactions.
They've got the credit card number, the merchant name, the time, and the total amount of the transaction.
They do not have line item level filtering of a transaction. Remember those old carbon paper credit card thingies? https://en.wikipedia.org/wiki/Credit_card_imprinter - that's all that's needed and all they get. Similarly, the credit card terminals where the merchant enters the amount, swipes the card (or reads the chip) and that's it is sufficient.
Mastercard and Visa would only be able to say "that merchant" not "that product." Filtering based on products and if it's legal there needs to be done by the merchant. Mastercard cannot check to see if someone is selling liquor to an underage customer... but if a merchant is doing that, Mastercard may drop that merchant as one of their clients.
If Itch and Valve are unable to enforce Australia specific laws on their own storefront, Mastercard and Visa can only enforce it at the "this merchant isn't allowed to transact with our network."