“You had me there for a second.”
Your wife played a trick on you by saying that she hadn't paid your mortgage, when in fact she had. You really believed that she hadn't paid it, and you were worried. After she tells you the truth, you laugh and say this.
You had me there for a second.
When you say "You had me there!" it means "You tricked me! I believed you!"
This is a phrase that you usually use when you think the trick was funny and don't mind it.
You can also add "going":
You had me going there for a minute.
Here's how you use this phrase to talk about someone else:
She had you there, didn't she?
In these sentences, "there" doesn't really have any meaning; it's just part of the phrase.
When you say that something happened "for a second", this is an exaggeration that means "for a short length of time".
She stared back at him for a second, then looked away.
Let me think for a second.
"A second" is used this way in casual spoken English. When you use "a second" in more formal situations, people may think that you literally mean 1/60th of a minute.