Download the PHP package emmanuelsaleem/laravel-stripe-manager without Composer
On this page you can find all versions of the php package emmanuelsaleem/laravel-stripe-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download emmanuelsaleem/laravel-stripe-manager
More information about emmanuelsaleem/laravel-stripe-manager
Files in emmanuelsaleem/laravel-stripe-manager
Package laravel-stripe-manager
Short Description Complete Laravel Stripe management package with UI for customers, products, subscriptions and payments
License MIT
Homepage https://github.com/es-77/laravel-stripe-managers
Informations about the package laravel-stripe-manager
Laravel Stripe Manager
A comprehensive Laravel package for managing Stripe customers, products, subscriptions, and payments with a complete web interface.
π Quick Start
Installation
- Install the package via Composer in your Laravel project:
Navigate to your Laravel application directory:
Then install the package:
For a specific version:
For the latest development version:
Important: The migration will automatically add a
stripe_idcolumn to youruserstable if it doesn't already exist. No additional User model setup is required!
-
Install required dependencies:
-
Publish and run migrations:
-
Publish views (optional):
- Publish configuration:
Configuration
- Add Stripe credentials to your
.envfile:
π Web Interface Access
Once installed, you can access the complete web interface at:
Main Dashboard
Available Routes
- Dashboard:
/stripe-manager- Overview with statistics - Products:
/stripe-manager/products- Manage products and pricing - Customers:
/stripe-manager/customers- Manage customers and payment methods - Subscriptions:
/stripe-manager/subscriptions- Manage subscriptions - Subscriptions Sync:
/stripe-manager/subscriptions-sync- Import existing Stripe subscriptions - Stripe Testing:
/stripe-manager/testing/stripe- Inspect Stripe customer data - Webhooks:
/stripe-manager/webhooks- Webhook management and logs
Authentication Required
All routes require authentication. Make sure users are logged in before accessing the interface.
π Features
- β Customer Management: Create, update, and manage Stripe customers
- β Card Storage: Store and manage customer payment methods locally
- β Product Management: Create and manage Stripe products with multiple pricing tiers
- β Pricing Management: Assign and manage product pricing with recurring/one-time options
- β Subscription Management: Create, update, cancel, and resume subscriptions
- β No Repeat Trial: Re-subscribing to the same plan skips free trial and charges immediately
- β Webhook Handler: Handle Stripe webhooks for payment events
- β Web Interface: Complete UI for managing all Stripe resources
- β Payment Tracking: Store and track subscription payments locally
- β Multiple Payment Methods: Add, list, set default, and delete cards per customer
- β
Product Ordering: Drag-and-drop product ordering saved via
display_order - β Subscriptions Sync: One-click sync of existing Stripe subscriptions into local DB, with skip report
- β Stripe Testing Panel: Inspect Stripe customer, subs, invoices, PMs, next invoice, and recent charges
- β Polished UI: Bootstrap 5 styling with a cohesive dark theme and improved pagination
π API (Optional)
The package exposes a minimal REST API for integrating your frontend or other services. The base path and middleware are configurable.
API Documentation
Explore and test the REST API using the Postman documentation:
Configure
In config/stripe-manager.php:
Base URL: {APP_URL}/{prefix} (default: /api/stripe-manager)
Endpoints
1) GET {prefix}/plans
- Returns active products with active pricing from local DB (not Stripe).
Response
2) GET {prefix}/users/{userId}/subscription
- Returns latest subscription summary for a user (local DB), including next billing date and amount when available.
Response
3) POST {prefix}/select-subscription-plan
- Create subscription for user with optional payment method.
Body
Response
Behavior
- No repeat trial: if the user previously subscribed to the same pricing, the trial is skipped and the user is charged immediately.
4) GET {prefix}/trial-info?user_id=123
- Returns latest trial info (if any) for the user.
5) DELETE {prefix}/cancel-subscription-plan
- Cancels the current subscription. Optional
immediately=truecharges behavior is respected by service.
Body
6) GET {prefix}/user-payment-methods?user_id=123
- Lists card payment methods from Stripe for the user.
7) POST {prefix}/save-stripe-id
- Saves a known Stripe customer id on the user.
Body
8) POST {prefix}/set-default-payment-method
- Sets the userβs default payment method on Stripe.
Body
Notes
- Secure these endpoints by adding your preferred auth middleware (e.g. Sanctum) in
api_routes.middleware. - Amounts are in the smallest currency unit (e.g., cents).
- Trials are enforced locally and verified with Stripe when possible to prevent re-trial abuse.
π» Programmatic Usage
Customer Service
Product Service
Subscription Service
π Webhook Setup
-
Configure webhook endpoint in Stripe Dashboard:
- URL:
https://yourdomain.com/stripe-manager/webhooks/handle - Events to send:
invoice.payment_succeededinvoice.payment_failedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedcustomer.subscription.trial_will_end
- URL:
- The webhook automatically handles:
- Payment success/failure tracking
- Subscription status updates
- Local database synchronization
ποΈ Database Schema
The package creates the following tables:
em_stripe_products- Stores Stripe productsem_product_pricing- Stores product pricing informationem_stripe_subscriptions- Stores subscription dataem_subscription_payments- Tracks payment historyem_stripe_cards- Stores customer payment methods
Additional columns:
em_stripe_products.display_order(uint, indexed) - for custom ordering
π§ͺ Testing
π€ Contributing
We welcome contributions! Here's how you can help:
Development Setup
- Fork the repository
-
Clone your fork:
-
Install dependencies:
-
Create a feature branch:
-
Make your changes and add tests
-
Run tests:
-
Commit your changes:
-
Push to your fork:
- Create a Pull Request
Contribution Guidelines
- Follow PSR-12 coding standards
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass
- Use meaningful commit messages
π License
This package is open-sourced software licensed under the MIT license.
β FAQ
Is the HasStripeId Trait Required?
No, the trait is optional. The package works without it by checking the stripe_id property directly. However, adding the trait provides helpful methods:
- With trait: The package checks
$user->hasStripeId() - Without trait: The package checks
empty($user->stripe_id)
Both approaches work identically. The trait is a convenience helper.
What if I don't have a stripe_id column?
Run the migration provided with the package:
This will add the stripe_id column to your users table automatically.
π Support
For support, please:
- Create an issue on the GitHub repository
- Contact [email protected]
- Connect on LinkedIn
βοΈ Advanced Configuration
Optional limits for Stripe API fetches (used by the testing panel):
These map to config/stripe-manager.php under stripe.limits.
π Usage Tips
- Customer create page supports search + pagination for large user sets
- Manage multiple cards on a customerβs detail page (add, default, delete)
- Drag-and-drop products on the products list to reorder
- Run Subscriptions Sync to import historical data; skipped subscriptions (no matching local user) are shown with reasons
π Changelog
v1.0.0
- Initial release
- Complete Stripe customer management
- Product and pricing management
- Subscription lifecycle management
- Webhook handling
- Payment tracking
- Web interface
All versions of laravel-stripe-manager with dependencies
laravel/framework Version ^9.0|^10.0|^11.0
laravel/cashier Version ^13.0|^14.0|^15.0
stripe/stripe-php Version ^10.0|^11.0|^12.0|^13.0|^14.0|^15.0|^16.0
illuminate/support Version ^9.0|^10.0|^11.0