Answered by Shaykh Faraz Rabbani
does one have to perform kaffara if during ramadhan they fasted and they masturbated while fasting?
Walaikum assalam wa rahmatullah,
No, it requires making up the fast (if ejaculation took place) and sincere repentance–but no expiation (kaffara) is required. [Shurunbulali, Maraqi al-Falah]
See Related QA.
And Allah alone gives success.