You should be cautious calling the management API from the client side, as it is quite limited due to the open nature of client side code. Check out this doc to see how to set things up.
M2M is essentially just server to server communication. You request a token with a client id and secret, then use the token in requests. You may need to setup some proxy between the stripe web hook and the management API.