I don't have an origin. But I have the first recorded use.
CARD -- noun 1. a. an odd or remarkable person; customer; character. Often constructed with preceding adjective. 1835, Charles Dickens, in F&H II 36: Mr. Thomas Potter, whose great aim it was to be considered a knowing card... b. an amusing or facetious person; joker -- often used sarcastically. Now colloquial. 1904 Life in Sing Sing 246: Card. Cod. Humorist..." From the "Random House Historical Dictionary of American Slang, Volume 1, A-G" by J.E. Lighter, Random House, New York, 1994.