PHPackages                             lack/subscription - 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. lack/subscription

ActiveLibrary[Payment Processing](/categories/payments)

lack/subscription
=================

Manage subscriptions accross microservices

1.3.0(1y ago)0926MITPHPPHP &gt;=8.0

Since May 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lack-project/lack-subscription)[ Packagist](https://packagist.org/packages/lack/subscription)[ Docs](https://infracamp.org)[ RSS](/packages/lack-subscription/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (11)Used By (0)

lack-subscription
=================

[](#lack-subscription)

Library to manage subscriptions accross services

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

[](#installation)

```
composer install lack/subscription
```

### Adding to Brace App

[](#adding-to-brace-app)

01\_di.php

```
$app->addModule(
    new SubscriptionClientModule(
        "file:///opt/conf/",
        CONF_SUBSCRIPTION_CLIENT_ID,
        CONF_SUBSCRIPTION_CLIENT_SECRET
    )
);
```

10\_middleware.php

```
$app->setPipe([
    ...
    // Below RouterEvalMiddleware
    // Search for {subscription_id} in the route and load the subscription object
    new SubscriptionMiddleware(),
    ...
]);
```

Usage
-----

[](#usage)

### In Controller Classes

[](#in-controller-classes)

The RouterEvalMiddleware will register a service `subscription` in the container. You can use this service to get the subscription object.

```
public function loadSubscription(T_Subscritpion $subscription)
{
    return $subscription;
}
```

### In Routes (as Middleware)

[](#in-routes-as-middleware)

```
AppLoader::extend(function (BraceApp $app) {

    $mount = CONF_API_MOUNT;

    $subscriptionAuthValidatorMw = new SubscriptionBasicAuthValidationMiddleware();

    // Validate auth token from mailbox of subscription
    $app->router->registerClass($mount, DocFusionApiCtrl::class, [$subscriptionAuthValidatorMw]);
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance41

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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 ~68 days

Recently: every ~154 days

Total

10

Last Release

493d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/878a384d056698a2400e4b7c8858db05a6caebb2c560e67151be36d46d58def0?d=identicon)[dermatthes](/maintainers/dermatthes)

---

Top Contributors

[![dermatthes](https://avatars.githubusercontent.com/u/13380559?v=4)](https://github.com/dermatthes "dermatthes (34 commits)")

---

Tags

subscriptionMicroservicelack

### Embed Badge

![Health badge](/badges/lack-subscription/health.svg)

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

###  Alternatives

[unicodeveloper/laravel-paystack

A Laravel Package for Paystack

650975.6k11](/packages/unicodeveloper-laravel-paystack)[payum/core

One million downloads of Payum already! Payum offers everything you need to work with payments. Friendly for all PHP frameworks (Symfony, Laravel, Laminas, Yii, Silex). Check more visiting site.

484.8M173](/packages/payum-core)[payum/stripe

The Payum extension. It provides Stripe payment integration.

22573.1k3](/packages/payum-stripe)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[yanlongli/app-store-server-api

PHP client for App Store Server API. Manage your customers’ App Store transactions from your server.The App Store Server API is a REST API that you call from your server to request and provide information about your customers' in-app purchases. The App Store signs the transaction and subscription renewal information that this API returns using the JSON Web Signature (JWS) specification.App Store Server API is independent of the app’s installation status on the customer’s devices. The App Store server returns information based on the customer’s in-app purchase history regardless of whether the customer installed, removed, or reinstalled the app on their devices.To request transaction and subscription status information with this API, provide any original transaction identifier that belongs to the customer. The transaction history API responds with a complete list of transactions, 20 at a time, starting with the oldest first. The subscription status API returns the status for all of the customer’s subscriptions, organized by their subscription group identifier.Use the Send Consumption Information endpoint to send information to the App Store when customers request a refund for a consumable in-app purchase, after you receive the CONSUMPTION\_REQUEST App Store server notification. Your data helps inform refund decisions.

2532.0k](/packages/yanlongli-app-store-server-api)[msonowal/laravel-razor-pay-cashier

Laravel Cashier provides an expressive, fluent interface to Razorpay's subscription billing services.

2625.3k](/packages/msonowal-laravel-razor-pay-cashier)

PHPackages © 2026

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