I imagine (with zero research) that the mechanism for adding credit would be the coin goes through a slot, and either itself completed a circuit, or the coin as it travels moves some lever to complete a circuit. So I imagine if you hit the machine just right, you'd also move that lever.
You were likely causing the spring-loaded mechanism that detects a coin insertion to make physical contact.
Yup - the first few minutes of one of Technology Connections' videos on electromechanical pinball machines shows this mechanism in action: