mix tiny_elixir_stripe.install (TinyElixirStripe v0.1.13)
View SourceInstall TinyElixirStripe with Stripe webhook support
This installer will:
- Replace Plug.Parsers with TinyElixirStripe.ParsersWithRawBody in your Phoenix endpoint
- Create a stub WebhookHandler module in lib/{app} for defining event handlers
- Generate a StripeWebhookController in lib/{app}_web that uses TinyElixirStripe.WebhookController
- Add a webhook route to your router that points to the generated controller
- Add :tiny_elixir_stripe to import_deps in .formatter.exs for DSL formatting support
The ParsersWithRawBody plug caches the raw request body for webhook signature verification, as required by Stripe's webhook security.
The generated controller automatically handles signature verification and forwards events to your WebhookHandler module.
Example
mix tiny_elixir_stripe.install --path /webhooks/stripe
Options
--pathor-p- The webhook endpoint path (default: "/webhooks/stripe")