Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Stripe Webhooks Laravel Package

spatie/laravel-stripe-webhooks

Laravel package to handle Stripe webhooks: verifies Stripe signatures, stores valid webhook calls in the database, and dispatches configurable jobs or events per Stripe event type. You implement the business logic (payments, subscriptions, etc.).

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate Stripe integration roadmap: Eliminates manual webhook handling, allowing the team to focus on business logic (e.g., subscriptions, payments) instead of boilerplate validation/routing.
  • Build vs. Buy: Avoids reinventing webhook security (signature verification), deduplication, and logging—critical for compliance and reliability. MIT license ensures no vendor lock-in.
  • Use Cases:
    • Subscription Management: Trigger user notifications, billing adjustments, or churn analysis on customer.subscription.deleted or invoice.paid.
    • Payment Flows: Process payment_intent.succeeded/failed to update order statuses or trigger refund workflows.
    • Fraud Prevention: Log and analyze charge.dispute.created events for manual review.
    • Multi-Tenant (Stripe Connect): Route webhooks per account/connection using configKey (e.g., signing_secret_{account_id}).
  • Scalability: Queue-based processing (ShouldQueue) ensures low-latency responses to Stripe (critical for 200 success codes) while offloading heavy work (e.g., syncing with CRM).
  • Auditability: Database logging of all webhook calls enables debugging and compliance reporting (e.g., "Why was this invoice marked failed?").

When to Consider This Package

  • Adopt if:
    • Your app relies on Stripe for payments/subscriptions and needs reliable, auditable webhook handling.
    • You’re using Laravel and want to avoid manual signature verification (security risk) or duplicate event processing.
    • Your team lacks expertise in Stripe’s webhook best practices (e.g., idempotency, retries).
    • You need multi-environment support (e.g., disable signature verification in local via config).
  • Look elsewhere if:
    • You’re not using Laravel (package is framework-specific).
    • Your webhook logic is trivial (e.g., single endpoint with no business rules).
    • You require real-time processing (queueing adds ~100ms latency; use raw Stripe SDK for synchronous flows).
    • You need advanced event filtering beyond Stripe’s native types (e.g., custom payload transformations).
    • Your team prefers serverless (e.g., AWS Lambda); this package assumes Laravel’s queue/worker setup.

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us safely and scalably handle Stripe webhooks—critical for our subscription business—without building and maintaining custom infrastructure. It:

  • Reduces risk: Automatically validates Stripe signatures and prevents duplicate processing.
  • Saves dev time: Cuts 2–3 days of work per new webhook endpoint (e.g., for churn alerts or refunds).
  • Enables compliance: Logs all events in our database for audits.
  • Scales effortlessly: Uses Laravel’s queue system to handle spikes (e.g., Black Friday traffic). Cost: Free (MIT license); ROI: Immediate productivity gains for the payments team."*

For Engineering:

*"This is a batteries-included solution for Stripe webhooks in Laravel. Key benefits:

  • Security: Handles HMAC signature verification and CSRF exemptions out of the box.
  • Reliability: Deduplicates events and logs failures to the webhook_calls table.
  • Flexibility:
    • Route events to jobs (for async work) or events/listeners (for sync logic).
    • Extend with custom models/profiles (e.g., filter duplicates or add pre/post-processing).
  • Stripe Connect Ready: Supports multiple signing secrets for platform businesses.
  • Debugging: Retry failed webhooks manually via ProcessStripeWebhookJob. Tradeoff: Adds ~50ms overhead per request (negligible for most use cases).* Next Steps:
  1. Add to composer.json and publish config/migrations.
  2. Define jobs for critical events (e.g., charge.succeeded → update order status).
  3. Test locally with Stripe’s webhook tester."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4