receive (one's) just deserts
To receive that which one deserves, especially a punishment or unfavorable outcome. (Note: The phrase is often misspelled as "just desserts," due to the pronunciation of "deserts" and "desserts" being the same in this context.) The CEO cheated his clients out of nearly $4 million, but he received his just deserts when he was stripped of everything he owned and sent to prison.