In the US, there are legally few limitations as long as you inform the customer. However all of the major credit cards have "most favored nation" clauses in their service agreements that prohibit charging any less for competing payment systems.
As a side note, many government services aren't allowed to eat the transaction cost, so they actually do pass the cost to the consumer (e.g. when I pay my annual car registration, an ACH (electronic check) payment is the same as paying cash in person, but a credit card has an additional fee tacked on.
As a side note, many government services aren't allowed to eat the transaction cost, so they actually do pass the cost to the consumer (e.g. when I pay my annual car registration, an ACH (electronic check) payment is the same as paying cash in person, but a credit card has an additional fee tacked on.