In a large mixing bowl, add 150 grams of gram flour (besan), 2 finely chopped green chilies, 1 teaspoon of red chili powder, 1/2 teaspoon of turmeric powder, 1/2 teaspoon of carom seeds (ajwain), a pinch of asafoetida (hing), salt to taste, and a handful of chopped coriander leaves. Mix well.
Add 2 thinly sliced medium-sized onions to the mixture and mix well, ensuring that the onions are well coated with the batter.
Gradually add water to the mixture and mix until you achieve a thick, smooth batter that coats the onions evenly.
Heat oil in a deep frying pan over medium heat. Once the oil is hot, drop spoonfuls of the onion batter into the oil, making sure not to overcrowd the pan.
Fry the pakodas until they turn golden brown and crispy, turning them occasionally to ensure even cooking.
Remove the pakodas from the oil using a slotted spoon and place them on a paper towel to drain excess oil.
Serve hot with green chutney or tomato ketchup.