Use a sinatra before handler:
before do
request.body.rewind
@request_payload = JSON.parse request.body.read
end
this will expose it to the current request handler. If you want it exposed to all handlers, put it in a superclass and extend that class in your handlers.