As an Indian who has worked extensively in multiple elections have "been there done that", let me tell everyone that above comment is completely ridiculous and devoid of any truth. It is not even a fringe phenomenon.

Let me answer the original question.

No one buys a vote in return of goodies. They buy "loyalty" vote is a consequence of that.

Each candidate appoints a booth level worker first. The booth level worker is in the inner circle of trust for the candidate and booth size is typically <1400 voters. Entire history of voting patterns of each booth is available publicly. A worker may handle multiple booths too.

The booth worker being a local already knows which way the winds are blowing and how to change their directions. For the poorest of poor he might offer cash and alcohol. For others he might offers government jobs, fake degrees, sex, licenses for businesses, shut eye approach towards illegal construction, protection from abusive husband and so on.

Once the voter buys in, he has to show absolute loyalty towards this candidate. He is expected to appear in rallies, at local speeches and even argue in favor of the candidate in market. Each person has enemies and in case Mr X appears to be saying unfavorable things in public someone will inform the booth level worker who will then show up at his house with goons.

You also need to understand secondary consequences of this sort of signaling. It means if a person was seen so actively working for Candidate X and if candidate Y wins, Candidate Y will not even help this person in future because obviously he was seen with Candidate X so often. (This can literally ruin people's lives from what I have seen). This also means there is zilch advantage for the person to backstab candidate X at the voting booth. (If you are married to her , you might as well have sex with her sort of thing). It is this phenomenon that eliminates back stabbing voters.

In my personal experience this soon reaches the level of lassie fair economics. At some point it pays lot more to simply sabotage the booth agent of your opponent instead of actually buying voters. If your prospective booth agent betrays you, you lose hundreds of votes. Just like voters even the booth agents are greedy. The candidate gives him lot of cash to distribute but sometimes he just keeps it to himself.

Part of the reason why BJP has done well in recent times despite spending less money than Congress is because BJP relies on its sister organization RSS which is a cadre based organization. They have pre-vetted individuals at every booth level whose loyalty is beyond doubt. The Congress party on other hand mostly relies on mercenary concept. They do a primary round of bidding where people who want their tickets tell how much money they can spend. The highest spender will then be given the ticket to fight elections. He has to donate 10% upfront to the party chief.

Note:

In my personal experience, with the exception of certain regions in most regions elections are pretty fair and are not determined by money. At least when it comes to Federal (central) elections. All candidates are aware of this fact. You might be able to gain additional 3% votes by sheer cash but you need to employ various other tactics to get more votes. As the middle class in India becomes larger and more aspirational the bids for votes change too. Even the poorest of poor now has electricity and hence correctly values 24x7 electricity above Rs 500 once in 5 years.