comeuppance n. An unpleasant experience a person endures, which is viewed by others as a just retribution for bad behavior; just deserts; as, the Senator took bribes for years, and finally got his comeuppance when he was caught in a sting operation.
... whipped by a parent or stronger friend, or by the victim himself later. Very clever strategies are thought out in detail by which the weaker gets even with or vanquishes the stronger, and one who suffers a rankling sense of injustice can hardly help day-dreaming of some form of comeuppance for his foe, although it takes years to do it. In these reveries the injurer in the end almost always gives up and sues for mercy at the feet of his quondam victim. So weird and dramatic are these scenes often that to some minds we must call anger and hate ... — The Journal of Abnormal Psychology - Volume 10