How to add a custom fee in my personalized quote and apply the price to the total of quote

Hello,

I’ve created my own model of quotes and i added in the code a line that stand for a support fee. This line can be displayed or not thanks to a checkbox like this:

The problem is that i can hide or show the fee line and also update visually the total of quote but when I land on the payment page, the total of the quote still the same as it was when there was’nt the support fee added.

So i suppose that i need to change the total vlaue on server side, but is it possible?? If yes, how can I do that?

Thanks for your answers