When you log your Mac out of iCloud, Apple Pay is immediately disabled, and all credit, debit, prepaid transport and ID cards are removed from its Wallet. When you sign back in, you should be able to add them back. This is a good reason for not logging out of iCloud if you can avoid it.