Coin/credit/token manager GPIO, disable playing on touchscreen

Hello, I am working on a project to build a jukebox using Volumio. I would like to add a feature where, like in the old days, a token needs to be inserted into a coin acceptor to allow a song to play. Is there a way, using GPIO plugins and others, to detect the end of a song playback? Additionally, my project will include a touchscreen, and apart from having credits stored, the touchscreen should prevent music from playing if no token has been inserted (the possibility of interrupting the touchscreen signal with a relay and managing the token counter in an “electro-mechanical” way). I know how to handle and design communicative boards under different voltage domains, but the creation of plugins and their capabilities is unknown to me.

Please if you know how to make my coin manager system working on my Volumio, help me

Sounds almost impossible to do with Volumio.
my 2 cents,

  • There is no functionality to limit a single track selection, you can as easily add complete albums.
  • The available events are stop/play/pause
  • The touch display plugin has no limitation so if you can insert a token to enable touch, you can even perform a factory reset
  • Volumio doesn’t come with a party mode, which could solve some of the previous bullets
  • You might be better of looking for specific software to deal with this like JukeANator