Depends on the logo on the credit card
UnionPay logo can only be used for credit card consumption on pos with UnionPay channel.
Those marked with foreign currency shall swipe their cards on their respective pos machines.
Hong Kong supports foreign currency cards and UnionPay cards.
Domestic credit cards are ok, even debit cards are ok.