Skip to content

bsbodden/stripe_event

Repository files navigation

stripe_event

stripe_event is built on the ActiveSupport::Notifications API. Incoming webhook requests are authenticated by retrieving the event from Stripe. The retrieved event is yielded to subscribers when published.

# Gemfile
gem 'stripe_event'
# config/routes.rb
mount StripeEvent::Engine => "/stripe_event"
# config/initializers/stripe.rb
Stripe.api_key = ENV['STRIPE_API_KEY'] # Set your api key

StripeEvent.configure do |config|
  # Define subscriber behavior
  config.subscribe 'charge.failed' do |event|
    MyClass.handle_failed_charge(event)
  end
end

About

Stripe webhook integration for Rails applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 92.6%
  • HTML 7.4%