PHPackages                             fzengin19/laravel-subscription-guard - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. fzengin19/laravel-subscription-guard

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

fzengin19/laravel-subscription-guard
====================================

This is my package laravel-subscription-guard

v1.3.0(1mo ago)01MITPHPPHP ^8.3 || ^8.4CI passing

Since Apr 7Pushed 1mo agoCompare

[ Source](https://github.com/fzengin19/laravel-subscription-guard)[ Packagist](https://packagist.org/packages/fzengin19/laravel-subscription-guard)[ Docs](https://github.com/fzengin19/laravel-subscription-guard)[ GitHub Sponsors](https://github.com/fzengin19)[ RSS](/packages/fzengin19-laravel-subscription-guard/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (6)Dependencies (28)Versions (8)Used By (0)

Laravel Subscription Guard
==========================

[](#laravel-subscription-guard)

Laravel Subscription Guard is a Laravel package for subscription billing, payment-provider integration, and license lifecycle management.

It combines:

- iyzico and PayTR provider adapters
- centralized billing orchestration
- webhook and callback intake
- license generation and validation
- feature and limit gating
- operational commands for renewals, dunning, plan changes, and license sync

What The Package Covers
-----------------------

[](#what-the-package-covers)

The current package surface includes:

- provider-managed and self-managed billing paths
- subscription creation, renewal, cancellation, and scheduled plan changes
- webhook persistence, idempotency, and async finalization
- 3DS and checkout callback intake
- license activation, revocation, heartbeat, and online validation
- seat-based and metered billing support
- invoice and notification pipeline hooks
- isolated iyzico live sandbox validation

Provider Model
--------------

[](#provider-model)

The package supports two billing ownership models:

- `iyzico`: provider-managed recurring billing, with local state updated from webhook and callback results
- `paytr`: package-managed recurring billing, with the package running renewal and retry orchestration

See [Providers](docs/PROVIDERS.md) for the current provider overview.

Provider-specific integration docs:

- [iyzico Provider](docs/providers/IYZICO.md)
- [PayTR Provider](docs/providers/PAYTR.md)

Install And Start
-----------------

[](#install-and-start)

Install the package:

```
composer require fzengin19/laravel-subscription-guard
php artisan vendor:publish --tag="laravel-subscription-guard-config"
php artisan vendor:publish --tag="laravel-subscription-guard-migrations"
php artisan migrate
```

Then continue with:

- [Installation Guide](docs/INSTALLATION.md)
- [Quickstart](docs/QUICKSTART.md)
- [Configuration Reference](docs/CONFIGURATION.md)

Core Commands
-------------

[](#core-commands)

The package currently exposes these core operational commands:

```
php artisan subguard:process-renewals
php artisan subguard:process-dunning
php artisan subguard:suspend-overdue
php artisan subguard:process-plan-changes
php artisan subguard:process-metered-billing
php artisan subguard:simulate-webhook paytr payment.success
php artisan subguard:simulate-webhook iyzico payment.success
php artisan subguard:sync-license-revocations
php artisan subguard:sync-license-heartbeats
php artisan subguard:generate-license 1 1
php artisan subguard:check-license
```

Route and command surface summary lives in [API](docs/API.md).

Queue Topology
--------------

[](#queue-topology)

Default queues are isolated by concern:

- billing jobs: `subguard-billing`
- webhook finalization jobs: `subguard-webhooks`
- notifications: `subguard-notifications`

Queue names are configurable under `subscription-guard.queue`.

First Local Validation Path
---------------------------

[](#first-local-validation-path)

For a safe local first-success path, start with install + migrate and then use simulated webhook intake:

```
php artisan subguard:simulate-webhook paytr payment.success
php artisan subguard:simulate-webhook iyzico payment.success
```

That validates the local webhook intake and finalization path without requiring real provider credentials.

Testing
-------

[](#testing)

```
composer test
composer test-live
composer analyse
composer format -- --test
```

- `composer test` runs the deterministic suite.
- `composer test-live` runs the isolated iyzico sandbox suite under `tests/Live`.

Documentation
-------------

[](#documentation)

### Getting Started

[](#getting-started)

- [Installation](docs/INSTALLATION.md)
- [Quickstart](docs/QUICKSTART.md)
- [Configuration](docs/CONFIGURATION.md)
- [FAQ](docs/FAQ.md)

### System Reference

[](#system-reference)

- [Architecture](docs/ARCHITECTURE.md)
- [Domain Billing](docs/DOMAIN-BILLING.md)
- [Domain Licensing](docs/DOMAIN-LICENSING.md)
- [Domain Providers](docs/DOMAIN-PROVIDERS.md)
- [Data Model](docs/DATA-MODEL.md)
- [Events And Jobs](docs/EVENTS-AND-JOBS.md)

### Providers and Integration

[](#providers-and-integration)

- [Providers](docs/PROVIDERS.md)
- [iyzico Provider](docs/providers/IYZICO.md)
- [PayTR Provider](docs/providers/PAYTR.md)
- [Custom Provider](docs/providers/CUSTOM-PROVIDER.md)
- [API](docs/API.md)
- [Webhooks](docs/WEBHOOKS.md)
- [Callbacks](docs/CALLBACKS.md)
- [Licensing](docs/LICENSING.md)

### Billing and Licensing Flows

[](#billing-and-licensing-flows)

- [Dunning And Retries](docs/DUNNING-AND-RETRIES.md)
- [Metered Billing](docs/METERED-BILLING.md)
- [Seat-Based Billing](docs/SEAT-BASED-BILLING.md)
- [Invoicing](docs/INVOICING.md)

### Runtime and Operations

[](#runtime-and-operations)

- [Commands](docs/COMMANDS.md)
- [Queues And Jobs](docs/QUEUES-AND-JOBS.md)
- [Security](docs/SECURITY.md)
- [Troubleshooting](docs/TROUBLESHOOTING.md)

### Testing

[](#testing-1)

- [Testing](docs/TESTING.md)
- [Live Sandbox](docs/LIVE-SANDBOX.md)

### Guides and Contributor

[](#guides-and-contributor)

- [Recipes](docs/RECIPES.md)
- [Use Cases](docs/USE-CASES.md)
- [Contributing](docs/CONTRIBUTING.md)

Internal planning docs live under `docs/plans/`.

Safety Notes
------------

[](#safety-notes)

Bank installment flags and application-level recurring collection are not the same thing.

If you need true multi-period manual collection, model it as your own scheduled billing flow instead of assuming provider installment settings create that behavior automatically.

Do not put real credentials into repository docs or example files.

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance91

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50.5% 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 ~7 days

Total

6

Last Release

45d ago

PHP version history (2 changes)v1.0.0PHP ^8.4

v1.2.0PHP ^8.3 || ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/106164630?v=4)[Fatih Zengin](/maintainers/fzengin19)[@fzengin19](https://github.com/fzengin19)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (388 commits)")[![fzengin19](https://avatars.githubusercontent.com/u/106164630?v=4)](https://github.com/fzengin19 "fzengin19 (130 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (46 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (31 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (23 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (20 commits)")[![pforret](https://avatars.githubusercontent.com/u/474312?v=4)](https://github.com/pforret "pforret (16 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (14 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (12 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (10 commits)")[![patinthehat](https://avatars.githubusercontent.com/u/5508707?v=4)](https://github.com/patinthehat "patinthehat (10 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (8 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (8 commits)")[![irfanm96](https://avatars.githubusercontent.com/u/42065936?v=4)](https://github.com/irfanm96 "irfanm96 (5 commits)")[![thecaliskan](https://avatars.githubusercontent.com/u/13554944?v=4)](https://github.com/thecaliskan "thecaliskan (5 commits)")[![IGedeon](https://avatars.githubusercontent.com/u/694313?v=4)](https://github.com/IGedeon "IGedeon (4 commits)")[![abenerd](https://avatars.githubusercontent.com/u/7523903?v=4)](https://github.com/abenerd "abenerd (3 commits)")[![jessarcher](https://avatars.githubusercontent.com/u/4977161?v=4)](https://github.com/jessarcher "jessarcher (3 commits)")[![koossaayy](https://avatars.githubusercontent.com/u/6431084?v=4)](https://github.com/koossaayy "koossaayy (3 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (3 commits)")

---

Tags

laravelfzengin19laravel-subscription-guard

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fzengin19-laravel-subscription-guard/health.svg)

```
[![Health](https://phpackages.com/badges/fzengin19-laravel-subscription-guard/health.svg)](https://phpackages.com/packages/fzengin19-laravel-subscription-guard)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k98.0M1.3k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M42](/packages/spatie-laravel-pdf)[spatie/laravel-passkeys

Use passkeys in your Laravel app

470755.5k32](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.9M53](/packages/jeffgreco13-filament-breezy)[dutchcodingcompany/filament-socialite

Social login for Filament through Laravel Socialite

2191.1M10](/packages/dutchcodingcompany-filament-socialite)

PHPackages © 2026

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