The oldest recipe I have found for cupcakes is the following recipe from ‘American Cookery’ by Amelia Simmons (1796). Baked in “small cups” but the word ‘cupcake’ is not used:
A light Cake to bake in small cups. Half a pound sugar, half a pound butter, rubbed into two pound flour, one glass wine, one do. rosewater, two do. emptins, a nutmeg, cinnamon and currants.
"do." means 'ditto' - the same as the previous ingredient - in this case ‘glass’. (A wine glass equals about 1/4 cup)
The term 'cupcake' is first found in Eliza Leslie's 'Receipts' (1828).