Place 60 grams (1/2 cup) of icing sugar and peanut butter in a medium bowl. Beat the mixture with an electric mixer until smooth. The filling would be smooth and creamy. Set aside.
If you want a stiffer filling, beat in the remaining 30 grams (1/4 cup) of icing sugar. It should be stiff enough to be rolled into balls. Line a baking sheet or a plate with plastic wrap. Divide the filling into 30 equal portions and roll into balls. Place it on the baking sheet (keeping them apart) and freeze them while you prepare the cookie dough.
Cookies
In a small bowl, combine the flour, cocoa powder, baking powder and salt. Whisk it gently to mix them altogether. Set aside.
In a large bowl, combine caster sugar, brown sugar, butter and peanut butter. Beat with an electric mixer on medium-high speed until the mixture is smooth and creamy, scraping down the sides occasionally, about 5 minutes. Scrape down the sides and add in the vanilla extract and egg. Beat with an electric mixer on medium speed until fully incorporated, about 1 minute.
Add in half of the flour mixture into the cookie batter. Stir with a spatula until almost incorporated, then add in the remaining flour mixture. Mix until the no streak of flour remains. Line another baking sheet (or a big plate) with plastic wrap. Divide the cookie dough into 30 portions and roll them into balls. Refrigerate them until you are ready to assemble the cookies.
Assembly and baking
Preheat the oven to 185 degrees Celsius. Line a baking sheet with parchment paper.
Take one portion of cookie dough and flatten it with your hands. Scoop a teaspoon of filling onto the centre of the dough (or place a portion of the frozen filling in the centre of the dough) and wrap it up to enclose the filling. Roll it into a ball. Repeat until all chocolate balls have been filled.
Place the cookies onto the baking sheet. Dip the bottom of a glass (or a shot glass) into the caster sugar and flatten the cookie slightly. Dipping into sugar will prevent the cookie from sticking to the bottom of the glass. If you don't want the caster sugar topping, simply use the heel of your hand and gently press the cookie to flatten it. Bake for 10 minutes for soft cookies and 12 minutes for slightly crispy ones. Let the cookies cool on a wire rack completely before storing.
Store the cookies in an air-tight container up to 7 days.