Preheat your oven to 350°F and line a cupcake pan with liners.
In a small bowl, sift together the flour, cocoa powder, espresso powder (if using), baking powder, baking soda, and salt. Set aside.
In a large bowl, cream together the granulated sugar and softened butter until fluffy.
Add the egg, egg yolk, and vanilla to the sugar mixture, mixing until pale and smooth.
Mix in the sour cream and milk until combined.
Gradually add the dry ingredients to the wet ingredients, mixing until smooth.
Divide the batter among the cupcake liners and bake for 17-19 minutes, or until a toothpick inserted into the center comes out clean.
Let the cupcakes cool completely on a wire rack.