Peach payments encrypts their webhook payload, so you'll need to decrypt it in order to do any sort of business logic with the notification.
decoder = PeachPayments::Decoder.new(
body: params[:encryptedBody], # This param is correct, don't change it
iv: request.headers["HTTP_X_INITIALIZATION_VECTOR"],
auth_tag: request.headers["HTTP_X_AUTHENTICATION_TAG"]
key: "some_super_secret_key" # when you create a webhook with peach, they will give you the decryption key as well
)
decoded_response = decoder.decode # a hash will be returned
# fancy business logic here ...