PHPackages                             koverae/koverae-billing - 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. koverae/koverae-billing

ActiveLibrary[Payment Processing](/categories/payments)

koverae/koverae-billing
=======================

Koverae Billing is a lightweight yet powerful Laravel package for managing subscriptions and billing. Designed for simplicity and flexibility, it enables businesses to handle subscription plans, free trials, and user billing seamlessly.

v1.3.0(11mo ago)138MITPHPPHP ^7.4|^8.3

Since Mar 2Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/Koverae/koverae-billing)[ Packagist](https://packagist.org/packages/koverae/koverae-billing)[ Docs](https://github.com/koverae/koverae-billing)[ RSS](/packages/koverae-koverae-billing/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (23)Used By (0)

[![Koverae Billing](https://github.com/Koverae/koverae-billing/raw/main/public/images/koverae-billing.png)](https://github.com/Koverae/koverae-billing/blob/main/public/images/koverae-billing.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/51d6b2ea14df69b68dff6ef548720f8a0c6a21dbfc0551ef8a03845ba5726e80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f76657261652f6b6f76657261652d62696c6c696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/koverae/koverae-billing)[![Total Downloads](https://camo.githubusercontent.com/4fe9b50a87079e9e1c3ad89bfd5fd638ba7cf2fdd23390cc8c9c105aedd76a41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f76657261652f6b6f76657261652d62696c6c696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/koverae/koverae-billing)[![GitHub Actions](https://github.com/koverae/koverae-billing/actions/workflows/main.yml/badge.svg)](https://github.com/koverae/koverae-billing/actions/workflows/main.yml/badge.svg)

[![Sparkline](https://camo.githubusercontent.com/ba5628df4d0cd1d49f7a78d80ab9852742a907dcb26d87a77fc60adad58a2da0/68747470733a2f2f73746172732e6d6564762e696f2f62617669782f6c61726176656c2d77616c6c65742e737667)](https://stars.medv.io/bavix/laravel-wallet)

Koverae Billing - Manage plans, trials, and payments with clean, extensible logic.

\[[Documentation](https://developer.koverae.com/koverae-billing/)\] \[[Get Started](https://developer.koverae.com/koverae-billing/guide/introduction/)\]

- **Vendor**: koverae
- **Package**: koverae-billing
- **[Composer](https://getcomposer.org/):** `composer require koverae/koverae-billing`

### Support Policy

[](#support-policy)

VersionLaravelPHPRelease dateEnd of improvementsEnd of support1.x \[LTS\]^11.0, ^12.08.2,8.3,8.4Apr 07, 2025May 1, 2026Sep 6, 2026### Upgrade Guide

[](#upgrade-guide)

To perform the migration, you will be [helped by the instruction](https://developer.koverae.com/koverae-billing/#/upgrade-guide).

### Community

[](#community)

I want to create a cozy place for developers using the Koverae Billing package. This will help you find bugs faster, get feedback and discuss ideas.

[![telegram](https://github.com/Koverae/koverae-billing/raw/main/public/images/billing-telegram.jpg)](https://github.com/Koverae/koverae-billing/blob/main/public/images/billing-telegram.jpg)

Telegram: [@koverae\_billing](https://t.me/koverae_billing)

### Usage

[](#usage)

Once installed and configured, using `koverae-billing` is straightforward and developer-friendly.

#### Models

[](#models)

`koverae-billing` uses this models:

```
Koverae\KoveraeBilling\Models\Plan;
Koverae\KoveraeBilling\Models\PlanCombination;
Koverae\KoveraeBilling\Models\PlanFeature;
Koverae\KoveraeBilling\Models\PlanSubscription;
Koverae\KoveraeBilling\Models\PlanSubscriptionFeature;
Koverae\KoveraeBilling\Models\PlanSubscriptionSchedule;
Koverae\KoveraeBilling\Models\PlanSubscriptionUsage;
```

#### Add Billing Support to a Model

[](#add-billing-support-to-a-model)

To start, add the `HasSubscriptions` trait to any model you want to make billable (typically the `User` model):

```
use Koverae\KoveraeBilling\Concerns\HasSubscriptions;

class User extends Authenticatable
{
    use HasSubscriptions;
}
```

#### Subscribing a User to a Plan

[](#subscribing-a-user-to-a-plan)

You can subscribe a user (or any model correctly traited) to a plan by using the newSubscription() function available in the HasSubscriptions trait. First, retrieve an instance of your subscriber's model, which typically will be your user model and an instance of the plan your subscriber is subscribing to. Once you have retrieved the model instance, you may use the newSubscription method to create the model's subscription.

```
$user = User::find(1);
$plan = Plan::find(1);

$user->newSubscription(
            'main', // identifier tag of the subscription. If your application offers a single subscription, you might call this 'main' or 'primary'
             $plan, // Plan or PlanCombination instance your subscriber is subscribing to
             'Main subscription', // Human-readable name for your subscription
             'Customer main subscription', // Description
             null, // Start date for the subscription, defaults to now()
             'free' // Payment method service defined in config
             );
```

### Checking a User’s Subscription

[](#checking-a-users-subscription)

For a subscription to be considered active one of the following must be true:

- Subscription has an active trial.
- Subscription `ends_at` is in the future.

Alternatively you can use the following methods available in the subscription model:

```
$user->subscription('main')->isActive();
$user->subscription('main')->isCanceled();
$user->subscription('main')->hasEnded();
$user->subscription('main')->hasEndedTrial();
$user->subscription('main')->isOnTrial();

// To know if subscription has the same values as related plan or has been changed
$user->subscription('main')->isAltered();
```

### Cancel or Resume a Subscription

[](#cancel-or-resume-a-subscription)

#### Renew a Subscription

[](#renew-a-subscription)

To renew a subscription you may use the `renew` method available in the subscription model. This will set a new `ends_at` date based on the selected plan.

```
$user->subscription('main')->renew();

$user->subscription('main')->renew(3); // This will triple the periods. CAUTION: If your subscription is 2 'month', you'll get 6 'month'
```

Canceled subscriptions can't be renewed. Renewing a subscription with trial period ends it.

When a subscription has already ended time ago and now is renewed, period will be set as if subscription started today, but when a subscription is still ongoing and renewed, start date is kept and end date is extended by the amount of periods specified

#### Cancel a Subscription

[](#cancel-a-subscription)

To cancel a subscription, simply use the cancel method on the user's subscription:

```
$user->subscription('main')->cancel();
```

##### Immediatly

[](#immediatly)

By default the subscription will remain active until the end of the period, you may pass true to end the subscription immediately:

```
$user->subscription('main')->cancel(true);
```

##### Fallback plan

[](#fallback-plan)

If a `fallback_plan_tag` is not `null` in config, when `cancel` is called, subscription will not be canceled but changed to fallback plan.

To cancel subscription and ignore fallback, a second parameter is available on `cancel` method:

```
$user->subscription('main')->cancel(false, true);
```

#### Uncancel a Subscription

[](#uncancel-a-subscription)

To uncancel a subscription, simply use the `uncancel` method on the user's subscription:

```
$user->subscription('main')->uncancel();
```

#### Scopes

[](#scopes)

```
// Get subscriptions by plan
$subscriptions = PlanSubscription::byPlanId($planId)->get();

// Get bookings of the given user
$user = \App\Models\User::find(1);
$bookingsOfUser = PlanSubscription::ofSubscriber($user)->get();

// Get subscriptions with trial ending in 3 days
$subscriptions = PlanSubscription::findEndingTrial(3)->get();

// Get subscriptions with ended trial
$subscriptions = PlanSubscription::findEndedTrial()->get();

// Get subscriptions with period ending in 3 days
$subscriptions = PlanSubscription::findEndingPeriod(3)->get();

// Get subscriptions with ended period
$subscriptions = PlanSubscription::findEndedPeriod()->get();

// Get subscriptions with period ending in 3 days filtered by the subscription tag
$subscriptions = PlanSubscription::getByTag('company')->findEndingPeriod(3)->get();
```

Contributors
------------

[](#contributors)

### Code Contributors

[](#code-contributors)

This project exists thanks to all the people who contribute. \[[Contribute](CONTRIBUTING.md)\].

- [Arden BOUET](https://github.com/arden28)
- [All Contributors](../../contributors)

License
-------

[](#license)

Forked originally from [bpuig/laravel-subby](https://github.com/bpuig/laravel-subby). Thank you for creating the original! :)

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

© 2025 | Arden BOUET, Some rights reserved.

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance53

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

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

Recently: every ~14 days

Total

22

Last Release

356d ago

PHP version history (2 changes)v1.0.0PHP ^7.4|^8.2

v1.3.0PHP ^7.4|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9284dde0bef7f702669d338c0d9b12c7e4a9ca406ea45865df41260e0d79faf7?d=identicon)[Koverae](/maintainers/Koverae)

---

Top Contributors

[![Arden28](https://avatars.githubusercontent.com/u/113308773?v=4)](https://github.com/Arden28 "Arden28 (45 commits)")[![Koverae](https://avatars.githubusercontent.com/u/155763524?v=4)](https://github.com/Koverae "Koverae (1 commits)")

---

Tags

billingkoveraelaravellivewirepackagepaystacksubscriptionsubscription-managerkoveraekoverae-billing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/koverae-koverae-billing/health.svg)

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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