All threads / How do I read an incoming webhook post in Rails 4.2

Ask A Question


You’re not receiving notifications from this thread.

How do I read an incoming webhook post in Rails 4.2

Aaron Mills asked in General

I have something along the lines of this:

case request.request_parameters.keys.first
when "new_subscription_notification"
when "canceled_subscription_notification"
deactivate_subscription params[:expired_subscription_notification]

But what I am finding is that the XML webhook request parameters seem to be blank. This is my first time trying to read webhook notifications.. any direction on how to correctly parse an incoming webhook would be awesome!

Hey Aaron,

That all sort of depends on what information is being sent to your webhook. Where is it coming from? What do the params look like? Have any example stuff we can take a look at to get you headed in the right direction?

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 52,887+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.