Extra fees on payment method

Hello, I hope everyone is doing well. I would like to add two payment methods: cash on delivery (COD) and card payment. However, when a customer chooses COD, I need to include additional fees on the total invoice, which we can call COD fees. Can anyone help? the support told me

[That’d require some custom code to add an extra “fee”\product to their order when the payment method is COD,]

Hi @Issa,
Please check this answer here: How to: Charge $5 extra if a client selects cash on delivery payment method? - #4 by yassine
Let us know how it goes.

Best.
Fey @Funnelish.