proverb

To pay one back in one’s own coin.

revenge

It means

to treat someone in the same manner they treated you, often in the sense of revenge or retaliation. It's a way of saying that someone is receiving the same treatment they once gave to others.