It’s very straightforward really, I have a barebones implementation in my GitHub. You can find specs in data-vending-machines.org