Place it at the moment a character approaches the door, then follow it with a shocked reaction for the reveal and an oh no laugh once the prank is clear, keeping the knock as the cue that starts the joke.