"attack with good-humored jokes and jests," 1670s, origin uncertain; said by Swift to be a word from London street slang. Related: Bantered; bantering. The noun, "good-humored ridicule," is from 1680s.
The third refinement observable in the letter I send you, consists in the choice of certain words invented by some pretty fellows; such as banter, bamboozle, country put, and kidney, as it is there applied; some of which are now struggling for the vogue, and others are in possession of it. I have done my utmost for some years past to stop the progress of mobb and banter, but have been plainly borne down by numbers, and betrayed by those who promised to assist me. [Swift, "The Tatler," No. 230, 1710]