get what's coming to one

get what's coming to one (to receive the good or bad that you deserve; get what is due to you; get your share.) — получить по заслугам; получить то, что причитается

Example 1: At the end of the movie the villain got what was coming to him and was put in jail. (AmIdioms)

Example 2: John didn't think he was getting what was coming to him, so he quit the job. (AmIdioms)

Example 3: Mother told Mary that she'd get hers if she kept on being naughty. (AmIdioms)

also
[serves you right]
[get one's come-uppance]
have it coming
serve right