4
votes

I can successfully send a web hook from Stripe to my Meteor app in development using ngrok. For example, my test endpoint on the Stripe dashboard would be sent to something like https://f5f62fdf.ngrok.io. It responds with a successful notice. The ngrok inspector shows the stripe test object received. But in Meteor I'm a little unsure how the router should look with ngrok. On the server, my route would be something like:

Router.route( "<unsure what path to put here>", function() {
  console.log('hello');
}, { where: "server" });

In my testing environment using ngrok, what would the path be?

Just trying to get the function to console.log() my 'hello' so I know it's working.

1

1 Answers

4
votes

OK, I'm an idiot. It console.logs to the terminal, not the browser. Ouch. Given I'm working with Node, it makes sense. Just for posterity, the Stripe endpoint would be something like https://g4r62fdf.ngrok.io/stripe/webhook.

Make sure you're returning a response inside the function so the web hook won't timeout.

this.response.statusCode = 200;
this.response.end('10-4, good buddy');