Automate Credit Card Surcharge

Automate Credit Card Surcharge

Is there a way to create an automation that will add a 3.0% credit card surcharge to a subscription whenever a customer pays via credit card?