PHPackages                             fullstack/stripe-product-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. fullstack/stripe-product-manager

ActiveLibrary[Payment Processing](/categories/payments)

fullstack/stripe-product-manager
================================

A library for managing Stripe products and prices

v0.0.5(10mo ago)031MITPHPPHP ^8.2

Since Jul 9Pushed 10mo agoCompare

[ Source](https://github.com/jdc1898/StripeProductManager)[ Packagist](https://packagist.org/packages/fullstack/stripe-product-manager)[ RSS](/packages/fullstack-stripe-product-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

Stripe Product Manager
======================

[](#stripe-product-manager)

A comprehensive Laravel package for managing Stripe products, prices, customers, invoices, and transactions with Filament admin integration.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require fullstack/stripe-product-manager
```

**Note:** This package requires the Spatie Laravel Permission package. If you haven't installed it yet, you'll need to:

```
composer require spatie/laravel-permission
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan migrate
```

Publishing Assets
-----------------

[](#publishing-assets)

The package provides several publishing groups for different types of assets:

### Publish Everything

[](#publish-everything)

```
php artisan vendor:publish --provider="Fullstack\StripeProductManager\StripeProductManagerServiceProvider"
```

### Publish Specific Assets

[](#publish-specific-assets)

**Configuration only:**

```
php artisan vendor:publish --provider="Fullstack\StripeProductManager\StripeProductManagerServiceProvider" --tag="stripe-product-manager-config"
```

**Migrations only:**

```
php artisan vendor:publish --provider="Fullstack\StripeProductManager\StripeProductManagerServiceProvider" --tag="stripe-product-manager-migrations"
```

**Seeders only:**

```
php artisan vendor:publish --provider="Fullstack\StripeProductManager\StripeProductManagerServiceProvider" --tag="stripe-product-manager-seeders"
```

Configuration
-------------

[](#configuration)

After publishing the configuration file, you can configure the package in `config/stripe-product-manager.php`:

```
return [
    'stripe' => [
        'secret_key' => env('STRIPE_SECRET_KEY'),
        'publishable_key' => env('STRIPE_PUBLISHABLE_KEY'),
        'webhook_secret' => env('STRIPE_WEBHOOK_SECRET'),
        'api_version' => env('STRIPE_API_VERSION', '2024-06-20'),
    ],

    'database' => [
        'prefix' => env('STRIPE_PRODUCT_MANAGER_DB_PREFIX', 'stripe_'),
        'tables' => [
            'products' => 'stripe_products',
            'prices' => 'stripe_prices',
            'customers' => 'stripe_customers',
            'invoices' => 'stripe_invoices',
            'transactions' => 'stripe_transactions',
            'coupons' => 'stripe_coupons',
            'discounts' => 'stripe_discounts',
            'promotion_codes' => 'stripe_promotion_codes',
            'tax_codes' => 'stripe_tax_codes',
            'tax_rates' => 'stripe_tax_rates',
            'sync_logs' => 'stripe_sync_logs',
        ],
    ],

    'sync' => [
        'enabled' => env('STRIPE_SYNC_ENABLED', true),
        'batch_size' => env('STRIPE_SYNC_BATCH_SIZE', 100),
        'retry_attempts' => env('STRIPE_SYNC_RETRY_ATTEMPTS', 3),
        'retry_delay' => env('STRIPE_SYNC_RETRY_DELAY', 5),
    ],

    'filament' => [
        'enabled' => env('STRIPE_FILAMENT_ENABLED', true),
        'panel' => env('STRIPE_FILAMENT_PANEL', 'admin'),
        'resources' => [
            'products' => true,
            'prices' => true,
            'customers' => true,
            'invoices' => true,
            'transactions' => true,
            'coupons' => true,
            'discounts' => true,
            'promotion_codes' => true,
            'tax_codes' => true,
            'tax_rates' => true,
        ],
    ],

    'logging' => [
        'enabled' => env('STRIPE_LOGGING_ENABLED', true),
        'channel' => env('STRIPE_LOGGING_CHANNEL', 'daily'),
        'level' => env('STRIPE_LOGGING_LEVEL', 'info'),
    ],
];
```

Environment Variables
---------------------

[](#environment-variables)

Add these to your `.env` file:

```
# Stripe Configuration
STRIPE_SECRET_KEY=sk_test_...
STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_API_VERSION=2024-06-20

# Package Configuration
STRIPE_PRODUCT_MANAGER_DB_PREFIX=stripe_
STRIPE_SYNC_ENABLED=true
STRIPE_SYNC_BATCH_SIZE=100
STRIPE_SYNC_RETRY_ATTEMPTS=3
STRIPE_SYNC_RETRY_DELAY=5

# Filament Integration
STRIPE_FILAMENT_ENABLED=true
STRIPE_FILAMENT_PANEL=admin

# Logging
STRIPE_LOGGING_ENABLED=true
STRIPE_LOGGING_CHANNEL=daily
STRIPE_LOGGING_LEVEL=info
```

Database Setup
--------------

[](#database-setup)

Run the migrations to create the necessary database tables:

```
php artisan migrate
```

Permissions Setup
-----------------

[](#permissions-setup)

After running migrations, seed the permissions and roles:

```
php artisan db:seed --class="Fullstack\StripeProductManager\Database\Seeders\StripeProductManagerPermissionSeeder"
```

This will create the following roles and permissions:

### Roles

[](#roles)

- **stripe-admin** - Full access to all Stripe functionality
- **stripe-manager** - Can manage products, prices, customers, invoices, and basic operations
- **stripe-viewer** - Read-only access to view Stripe data

### Guards

[](#guards)

The package supports three authentication guards:

- **web** - Standard web authentication
- **tenant-admin** - Tenant-specific admin authentication
- **super-admin** - Super admin authentication

Each guard has its own set of roles and permissions, allowing for multi-tenant and hierarchical access control.

### Permissions

[](#permissions)

The package creates granular permissions for each Stripe entity:

- `stripe.products.*` - Product management permissions
- `stripe.prices.*` - Price management permissions
- `stripe.customers.*` - Customer management permissions
- `stripe.invoices.*` - Invoice management permissions
- `stripe.transactions.*` - Transaction management permissions
- `stripe.coupons.*` - Coupon management permissions
- `stripe.discounts.*` - Discount management permissions
- `stripe.promotion_codes.*` - Promotion code management permissions
- `stripe.tax_codes.*` - Tax code management permissions
- `stripe.tax_rates.*` - Tax rate management permissions
- `stripe.admin.*` - Administrative permissions

### Using Permissions in Your User Model

[](#using-permissions-in-your-user-model)

Add the `HasStripePermissions` trait to your User model:

```
use Fullstack\StripeProductManager\Traits\HasStripePermissions;

class User extends Authenticatable
{
    use HasStripePermissions;

    // ... rest of your User model
}
```

Then you can use the permission methods:

```
// Check permissions
if ($user->canViewStripeProducts()) {
    // User can view products
}

if ($user->canCreateStripeProducts()) {
    // User can create products
}

// Check roles
if ($user->isStripeAdmin()) {
    // User is a Stripe admin
}

if ($user->hasStripeRole()) {
    // User has any Stripe role
}

// Guard-specific checks
if ($user->isStripeAdminForTenant()) {
    // User is a Stripe admin for tenant-admin guard
}

if ($user->isStripeAdminForSuper()) {
    // User is a Stripe admin for super-admin guard
}

if ($user->canViewStripeProductsForTenant()) {
    // User can view products for tenant-admin guard
}
```

### Using Middleware

[](#using-middleware)

The package provides middleware for guard-based authentication:

```
// In your routes file
Route::middleware(['stripe.guard:tenant-admin'])->group(function () {
    Route::get('/stripe/products', [StripeController::class, 'index']);
});

Route::middleware(['stripe.guard:super-admin'])->group(function () {
    Route::get('/stripe/admin', [StripeAdminController::class, 'index']);
});
```

Or in your controllers:

```
public function __construct()
{
    $this->middleware('stripe.guard:tenant-admin');
}
```

Usage
-----

[](#usage)

### Models

[](#models)

The package provides several Eloquent models for Stripe entities:

- `StripeProduct` - Stripe products
- `StripePrice` - Product pricing
- `StripeCustomer` - Customer data
- `StripeInvoice` - Invoice information
- `StripeTransaction` - Transaction data
- `StripeCoupon` - Coupon management
- `StripeDiscount` - Discount tracking
- `StripePromotionCode` - Promotion codes
- `StripeTaxCode` - Tax code definitions
- `StripeTaxRate` - Tax rate information

### Filament Integration

[](#filament-integration)

The package includes Filament resources for all Stripe entities. These will be automatically registered if Filament is installed and the `STRIPE_FILAMENT_ENABLED` option is set to `true`.

### Console Commands

[](#console-commands)

The package will include console commands for syncing data with Stripe (to be implemented):

```
# Sync products from Stripe
php artisan stripe:sync-products

# Sync customers from Stripe
php artisan stripe:sync-customers

# Sync invoices from Stripe
php artisan stripe:sync-invoices
```

Features
--------

[](#features)

- ✅ Complete Stripe entity management
- ✅ Filament admin panel integration
- ✅ Database synchronization
- ✅ Webhook handling
- ✅ Tax management
- ✅ Coupon and promotion code support
- ✅ Invoice and transaction tracking
- ✅ Customer management
- ✅ Configurable database prefixes
- ✅ Comprehensive logging
- ✅ Role-based access control with Spatie permissions
- ✅ Granular permissions for each Stripe entity
- ✅ Pre-configured roles (Admin, Manager, Viewer)
- ✅ Permission trait for easy integration
- ✅ Multi-guard support (web, tenant-admin, super-admin)
- ✅ Guard-specific permission methods
- ✅ Middleware for guard authentication

Support
-------

[](#support)

For support, please contact

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance54

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

313d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bee8d0a3a7ed351b1b7617c1005dabcdd7c6b7587eed32ae80a4939064327d2e?d=identicon)[dchurch](/maintainers/dchurch)

---

Top Contributors

[![jdc1898](https://avatars.githubusercontent.com/u/3174628?v=4)](https://github.com/jdc1898 "jdc1898 (6 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fullstack-stripe-product-manager/health.svg)

```
[![Health](https://phpackages.com/badges/fullstack-stripe-product-manager/health.svg)](https://phpackages.com/packages/fullstack-stripe-product-manager)
```

###  Alternatives

[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

322.8k](/packages/duncanmcclean-statamic-cargo)[wandesnet/mercadopago-laravel

PHP SDK for integration with Mercado Pago

252.4k](/packages/wandesnet-mercadopago-laravel)[tsaiyihua/laravel-linepay

linepay library for laravel

102.9k](/packages/tsaiyihua-laravel-linepay)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
