Ingredients

2 1/2 cups unbleached all-purpose flour 

2 teaspoons baking powder 

3/4 teaspoon kosher salt 

1 teaspoon ground cinnamon 

1/4 teaspoon ground allspice 

1 cup whole milk 

1 teaspoon pure vanilla extract 

5 tablespoons unsalted butter, room temperature 

1/2 cup granulated sugar 

1/2 cup packed light-brown sugar 

1 large egg, room temperature 

1/3 cup granulated sugar 

Pinch of kosher salt 

3 tablespoons heavy cream 

2 teaspoons unsalted butter 

1 1/4 cups confectioners' sugar 

1/4 teaspoon pure vanilla extract 

7 tablespoons unsalted butter, room temperature 

2 tablespoons coarse sanding sugar 

3/4 teaspoon pink rock salt, such as Himalayan 

Preparation

Cookies: Preheat oven to 375 degrees. Whisk together flour, baking powder, kosher salt, cinnamon, and allspice. In another bowl, combine milk and vanilla.

In a large bowl, beat butter with granulated and brown sugar on high speed until smooth, about 3 minutes. Add egg; beat until pale, about 2 minutes. Reduce speed to low and beat in flour mixture in two batches, alternating with milk mixture. Increase speed to medium-high and beat until just combined, about 10 seconds. Transfer mixture to a pastry bag fitted with a 5/8-inch round tip (such as Ateco #808).

Pipe 2 1/2-inch-diameter mounds onto 3 parchment-lined baking sheets, spaced about 3 inches apart (no more than 8 per sheet). Bake, rotating sheets halfway through, until cookies spring back when lightly pressed, 12 to 14 minutes. Transfer sheets to wire racks; let cool completely.

Caramel: In a small high-sided saucepan over medium heat, combine sugar, salt, and 2 tablespoons water, stirring until sugar is dissolved. Continue to cook, without stirring, and washing down sides of pan with a wet pastry brush to prevent crystals from forming, until caramel is a deep amber, 8 to 10 minutes. Remove from heat.

Carefully whisk in cream (it will spatter), then butter, until combined. Let cool completely, about 45 minutes.

Buttercream: Meanwhile, in a large bowl, beat butter on medium-high speed until pale and creamy, about 2 minutes. Reduce speed to medium; add sugar, 1/4 cup at a time, beating after each addition, until combined, 1 to 2 minutes. Beat in vanilla.

Beat caramel into buttercream on medium speed, scraping down sides of bowl as necessary, until smooth, about 3 minutes. Makes 2 cups.

Put buttercream in a pastry bag fitted with the 5/8-inch round tip. Pipe 2 tablespoons onto flat sides of half of cookies, then sandwich with remaining cookies. Refrigerate until firm, about 30 minutes.

In a small bowl, stir together rock salt and sanding sugar. Roll edges of sandwiches in sugar-salt mixture. (Whoopie pies can be refrigerated in airtight containers up to 3 days.)