comeuppance
\ kuhm-UHP-uhns \, noun;
1.Informal . deserved reward or just deserts, usually unpleasant: He finally got his comeuppance for his misbehavior .
Quotes:
It’s hard to conceive a bigger comeuppance than the one Faustus receives at the end of the play, when the clock ticks down on his two-dozen years.
-- John J. Miller, "Sympathy for the Devil," The Wall Street Journal , October 17, 2014
Emerson saw imminent class conflict as a moral crisis, the natural comeuppance of spiritual degeneration.
-- Lance Newman, "Our Common Dwelling ," 2005
Origin:
Comeuppance comes from the verbal phrase come up meaning "present oneself for judgment before a tribunal." It is an Americanism that gained popularity in mid-1800s.
Dictionary.com