AshBilling.Plug (ash_billing v0.1.1)

Copy Markdown View Source

A Plug for receiving and verifying incoming webhooks from billing providers.

Usage in Phoenix Router

forward "/webhooks/stripe", AshBilling.Plug,
  provider: AshBilling.Providers.Stripe,
  webhook_secret: {System, :get_env, ["STRIPE_WEBHOOK_SECRET"]},
  handler: MyApp.Billing.WebhookHandler