How do I add a flat processing fee to all products for a particular payment mode?

I need to a flat processing fee percentage to all products when customer chooses a specific payment method.

Say if the customer chooses the payment method as - UPI, I need the a processing fee percentage to be added to the checkout with the final amount. It is non-taxable.

Can someone please help me with this?