First thing is to check your state laws, there are some states where surcharging for using a CC is illegal.
For those states that are ok with it, there is still a problem. You are required to put a notice on the store, the check out pages, and on the receipt it must specify the surcharge item and amount, that you surcharge for using a CC and how much, the law says a % is not legal. In addition to that, you are not allowed to surcharge when a debit or prepaid card is used at all. So if you are taking payments on line I don't see how you can know whether or not a card is a prepaid or debit card in advance.
You would have to create a service type item called surcharge and include it on the invoice for the customer, that would mean you know in advance they will use a CC, and not a debit or prepaid card
Best option is just raise your prices slightly, or accept that a merchant charge is just a cost of doing business.