i know. you can get one of these optical switches (in picture) to sense beam break caused by the coin slotted into the machine.The optical switch consists an IR LED and a phototransistor. The circuit will break if any object passes it.
Hope this helps.