Click the vending machine, change it to be a keycard or money. Now click the three dots and go to All options. Make it not visible in game. Now for the item name put the item needed to purchase it. Now press it again, Click the 3 dots and Click funding.
When you play it it should look like this.
Now make sure to make a wire from vending machine to cardboard and keycard, when purchased hide prop. Do this for both.