Place the sliced onions in a bowl of ice water and let them soak.
In a large mixing bowl, combine gram and corn flour with cumin, red chili flakes, salt, baking powder, baking soda, turmeric, fresh cilantro, and green chilies. Stir to combine.
Squeeze excess water from the onions and add them to the bowl. Gradually add the ice water, a little at a time, stirring after each addition. Stop when the batter sticks to the coriander and onions like glue—you may not need all the water. The batter should not be runny.
Heat 3 inches (7.5cm) of oil in a heavy-bottomed pot over medium-high heat until it reaches 350°F (175°C). Test the oil by dropping in a small amount of batter, it should sizzle immediately.
Working in batches, carefully slide tablespoons of batter into the oil. Fry, agitating and turning the pakoras, for 1½ to 2 minutes, until golden brown and fully cooked through. Adjust the heat as needed to maintain 350°F-360°F (175°C-182°C).
Remove the cooked pakoras with a slotted spoon and transfer to a platter lined with paper towels. Serve hot.