FWIW, if you pay with credit/debit, then there is a fee charged by the banks to process that payment, whether you pay in-person or online. I've never read of a city that isn't statutorily prohibited from absorbing the costs of those fees. They're added to the amount owed.
In regards to online payments, I wouldn't be surprised if your city outsourced that service, which adds an additional cost (vs. paying in person).
I live in VA's largest city, and they charge $4.95 to pay a parking ticket or city bill (like water) online with credit/debit. For taxes owed, it's 2.5%. Paying online with a check is free.
Well whatever the case is, it's ridiculous. Almost everything is done online nowadays. There are extra charges because they know that. Whether its the credit card companies/banks, etc.