I heard about ritual flagellations in the cult of Orthia in ancient sparta during 9th century i guess.
According to Kama Sutra scripture, four kinds of "hitting" are allowed during love-making and it clearly suggests that bitting pinching and hitting must be performed consensually as some women may not consider such acts joyful.