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
Stripe Subscription Bundle

Stripe Subscription Bundle Laravel Package

advancingu/stripe-subscription-bundle

Laravel bundle for managing Stripe subscriptions and billing flows. Provides helpers for plans, customers, trials, cancellations, and webhook handling, aiming to simplify common subscription tasks and integrate Stripe into your app with minimal setup.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Stripe Subscription Bundle
Does this bundle support Laravel 9 or 10, or is it limited to older versions?
The bundle appears archived and likely targets Laravel 5.5–8.x. It may not work out-of-the-box with Laravel 9/10 due to dependency conflicts or deprecated Laravel features. Test thoroughly or fork the project for compatibility.
How do I handle Stripe webhooks with this bundle? Does it include security best practices?
The bundle provides utilities for webhook handling but assumes you’ve configured Stripe’s webhook endpoints with shared secrets. Security relies on Laravel’s middleware; ensure you validate signatures and restrict IPs to Stripe’s servers. No built-in retry logic exists for failed webhooks.
Can I use this bundle alongside **spatie/laravel-stripe** or another Stripe package?
Potential conflicts exist due to overlapping service providers (e.g., StripeSubscriptionManager vs. spatie’s Stripe facade). Avoid mixing them unless you’re willing to refactor or maintain parallel logic. Check for namespace collisions in config files.
What happens if a subscription fails during payment? Does the bundle retry or notify users?
The bundle doesn’t include automated retry logic for failed payments. You’ll need to implement custom logic (e.g., Laravel queues) to retry payments or notify users. Stripe’s webhooks will trigger `invoice.payment_failed` events, which you can capture for alerts.
How do I customize subscription plans or add discounts (e.g., coupons, trial periods)?
Plans and discounts are managed via Stripe’s API, but the bundle provides helpers to attach them to users. Use Stripe’s `Price` or `Plan` objects in your Laravel models. For trials, configure the `trial_end` parameter when creating subscriptions via the bundle’s methods.
Is there a way to test webhook handling locally without hitting Stripe’s servers?
No built-in local testing exists, but you can mock Stripe’s webhook payloads using Laravel’s HTTP testing tools or tools like **ngrok** to forward local requests to Stripe’s test endpoint. Manually trigger events via `stripe/webhook` middleware for validation.
What database schema does this bundle expect? Can I use it with an existing subscriptions table?
The bundle assumes a `users` table with a `stripe_id` field and likely expects subscription data linked via Eloquent relationships. No migrations are provided, so you’ll need to adapt your schema or extend the bundle’s models to match your existing structure.
Does this bundle support Stripe’s latest Billing API (v2) or only the legacy Subscriptions API?
The bundle likely uses Stripe’s legacy Subscriptions API (v1) due to its age. For Billing API v2 features (e.g., Subscription Schedules, Invoice Items), you’d need to extend the bundle or use Stripe’s PHP library directly alongside it.
How do I cancel a subscription or handle proration? Does the bundle support partial refunds?
Cancellation is supported via the bundle’s methods (e.g., `cancel()`), but proration behavior depends on Stripe’s settings. Partial refunds require direct Stripe API calls, which aren’t wrapped by the bundle. Use `stripe/subscription` methods for advanced refund logic.
What’s the best way to migrate from custom Stripe logic to this bundle in a live app?
Start by replacing new subscription flows with the bundle’s methods, then gradually migrate existing subscriptions using a data migration script. Use feature flags to toggle between old and new logic during the transition. Test webhooks in parallel to avoid downtime.
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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware