One of the hard aspects is the electro mechanical side , and really that is the hard part .
How are you to make the dispenser , power it , communicate with it ?
Then there is the financial side, how do people pay, what happens when they pay and nothing happens .
You need to sort those aspects and cost them out before worrying about coding .
I would look at what is commercially available , I’d expect this to be pretty expensive , certainly more than $10,000 to get something running .
You need a plan with all these items costed out .