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, logs valid calls to the database, and dispatches configurable jobs or events per webhook type. Provides the plumbing for receiving and validating webhooks; you implement the business logic.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Accelerates development by eliminating the need to build custom Stripe webhook handling from scratch, reducing time-to-market for payment-related features.
  • Feature Expansion: Enables rapid integration of Stripe’s event-driven workflows (e.g., subscriptions, payments, disputes) without reinventing security/validation logic.
  • Roadmap Priorities:
    • Payments/Subscriptions: Critical for SaaS, e-commerce, or fintech apps where real-time payment processing is core.
    • Compliance/Logging: Supports PCI-DSS or audit requirements by logging all webhook calls (including payloads/exceptions).
    • Scalability: Queue-based processing ensures high availability during traffic spikes (e.g., Black Friday sales).
  • Use Cases:
    • Automated Workflows: Trigger actions like sending receipts, updating user balances, or syncing inventory on payment events.
    • Fraud Prevention: Process charge.dispute.created events to flag high-risk transactions.
    • Multi-Tenant (Stripe Connect): Handle webhooks for multiple connected accounts with dynamic signing secrets.

When to Consider This Package

  • Adopt if:
    • Your app relies on Stripe for payments/subscriptions and needs reliable, scalable webhook handling.
    • You prioritize security (automatic signature verification) and auditability (database logging).
    • Your team lacks expertise in Stripe’s webhook best practices (e.g., idempotency, retries).
    • You’re using Laravel and want to leverage its ecosystem (queues, events, jobs).
  • Look Elsewhere if:
    • You need real-time processing (this package queues jobs by default; consider raw Stripe SDK for synchronous responses).
    • Your stack isn’t Laravel/PHP (e.g., Node.js, Python).
    • You require custom Stripe API integrations beyond webhooks (e.g., direct API calls for reporting).
    • You’re building a serverless app (this package assumes Laravel’s queue/worker setup).
    • You need multi-signature support (e.g., rotating secrets without config changes; may require custom WebhookProfile).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us safely and scalably handle Stripe’s real-time payment events—like subscriptions, refunds, or fraud alerts—without building and maintaining custom infrastructure. It’s battle-tested (used by 500+ projects), reduces risk of missed events or security gaps, and integrates seamlessly with our Laravel stack. For example, we could automatically:

  • Send receipts when invoice.payment_succeeded fires.
  • Pause trials on customer.subscription.deleted.
  • Log all events for compliance, with retries for failed jobs. This cuts dev time by 80% while improving reliability—critical for [revenue growth/payments roadmap]."*

For Engineering:

*"This is a drop-in solution for Stripe webhooks in Laravel that handles:

  • Security: Validates Stripe signatures automatically (no manual checks).
  • Scalability: Queues jobs to avoid timeouts (e.g., during high-volume events).
  • Debugging: Logs all payloads/exceptions to webhook_calls table.
  • Extensibility: Supports custom jobs, events, or profiles for advanced use cases (e.g., Stripe Connect).

Tradeoffs:

  • Not real-time (jobs are queued; add ~seconds delay).
  • Requires Laravel’s queue system (Sidekiq/Redis).
  • Limited to Stripe events (not raw API calls).

Quick Start:

  1. Install: composer require spatie/laravel-stripe-webhooks.
  2. Configure secrets in .env and stripe-webhooks.php.
  3. Map events to jobs (e.g., charge.succeededHandlePaymentJob).
  4. Profit.

Alternatives: Rolling your own (risky) or using Stripe’s raw SDK (more boilerplate). This is the Laravel-native, production-ready choice."*

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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai