I just got curious on this and I want to know if this is allowed or not.
The Haraam (prohibited) form of beating or smacking
First of all it is important for us to understand what kind of beating or smacking is haraam in Islam:
1) It is prohibited to beat children such that it harms or injures them. The beating or smacking should not cause injury, and it should not be in the face or on to a lethal site; rather it should be on the shoulder, legs or the hands, which would not cause him to die. It is also prohibited to hit on face as Prophet forbade it.
2) It is prohibited to beat children for ones own desire to punish in anger rather than to discipline them.
3) It is also not allowed to strike more than 10 times as Rasuallah forbade it.
It was narrated from Abu Bardah al-Ansari that he heard the Messenger of Allah (sallahu alahi wasallam) say: No one should be given more than ten lashes except in the case of one of the hadd punishments of Allah.” (Narrated by Al Bukhaari (6456) & Muslim (3222))
The Halaal (permissible) form of beating or smacking
Beating or Smacking is a means of correcting the child particularly when the child is stubborn & disobedient and all the efforts of advising by words has failed. There is a system of punishment in Islam, such as the hadd punishments & the non hadd punishments, prescribed in order to set the people straight and put a stop to their evil and disobedience. Prophet (sallahu alahi wasallam) advised parents to stop their children from doing wrong.
It was narrated from Ibn Abbaas that the Messenger of Allah said: “Hang your whip where the members of the household can see it, for that will discipline them.” (Narrated by al-Tabaraani, 10/248; its isnaad was classed as hasan by al-Haythami in Majma’ al-Zawaa’id, 8/106, Al albani said it is hasan)
The following are some summarized points on the permissible beating or smacking:
1) It must be done as last resort only after all other ways have been tried.
2) It must be done occasionally only, as it’s need does not arise frequently. Most of the times, stern verbal warning does the job.
3) It must be done in private and not in front of everyone so as to protect the child’s self-esteem and his dignity in front of his friends and others.
4) It must be done with the intent of disciplining the child for the sake of Allah.
5) It must be done with complete mercy in heart for the child and doing away with any kind of hatred.
The Messenger of Allah (sallahu alahi wasallam) said: “Teach your children to pray when they are seven years old, and smack them (lightly) if they do not pray when they are 10 years old, and separate them in their beds.” (Abu Dawood (459) and Ahmad (6650), Classed as saheeh by al-Albaani in al-Irwa’ (247)).