Can my employer deduct the credit card service charge from my tip when the customer pays with a credit card and puts the tip on the card?

Yes. The law does allow the employer to make this deduction. So, for example, if the credit card company charges 3% of the total amount of the transaction, your boss can withhold 3% of the tip and only give you 97% of the tip amount.