"ha" can be used in a sarcastic way like this:
A: When did the first war happen?
B: In 1950.
A: Wrong. It happened in 1914.
B: I know that.
A: That's why you answered it correctly, ha?
I thought of "huh" as a synonym to it, but its meaning doesn't indicate that.
I found the following web page, but it appeared to have no synonyms to the above case:
https://www.merriam-webster.com/thesaurus/ha
The meaning of "ha" according to Cambridge dictionary:
Used to express satisfaction that something bad has happened to someone who deserved it, or to show that you have succeeded in something.
The meaning of "huh" according to https://www.vidarholen.net/contents/interjections/ :
Really? - Mild, indifferent surprise