Is it permissible for a school to charge detention fees?

My sons studies at a darul uloom. He gets detention on a Saturday after school for 1 hour for not completing his targets for the week. He has to pay £5.00 towards this detention. With the money, they buy gifts for the person who reads the most items in each class. Is it permissible to take money from parents in this way?

Answer:

In the Name of Allah, the Most Gracious, the Most Merciful.

As-salāmu ‘alaykum wa-rahmatullāhi wa-barakātuh.

It is not permissible for an institution to impose a financial penalty for a detention.[1]