Preheat your oven to 350°F (175°C) and grease an 8x8-inch baking pan or line it with parchment paper for easy removal.
In a large mixing bowl, whisk together the flour, sugar, cocoa powder, baking powder, and salt until well combined.
In a separate bowl, mix the melted butter, eggs, and vanilla extract until smooth. Stir in the ube halaya until fully incorporated.
Gradually add the wet ingredients to the dry ingredients, mixing until just combined. Be careful not to overmix. If using, fold in the chocolate chips.
Pour the batter into the prepared baking pan and spread it evenly.
Bake for 25-30 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs (not wet batter).
Allow the brownies to cool in the pan for at least 15 minutes before cutting into squares and serving.