Term: jokes on you
Example: if you put glue on your friends seat and mistakenly sit there, the jokes on you
Definition: when you try to pull a joke on someone and instead you are the victim, the joke is on you