Reputation: 1602
I have stripe all set accepting payments and the stripe_event gem installed. In the docs for the gem it says to just do something like this in routes.rb:
mount StripeEvent::Engine => '/stripe'
but that is failing to show anything at that route. What else do I need to do to get the webhook working in my development environment? Is it even possible? (I did set the stripe webhook to be sent to 0.0.0.0:3000 but I am sure that is wrong.
Thank you!
Upvotes: 1
Views: 1589
Reputation: 968
For anyone else trying to receive webhooks on localhost with a Rails application I highly recommend this tool I just came across. Setup and running in seconds:
Upvotes: 8
Reputation: 1925
The webhook endpoint you set with Stripe needs to be a live url, not 0.0.0.0 or localhost. The routes appear to be setup correctly. You can test locally using curl:
$ curl -X POST -H "Content-type: application/json" -H "Accept: application/json" -d '{"id":"evt_REPLACEME"}' localhost:3000/your-webhook-path
Upvotes: 6