Download the PHP package koverae/koverae-billing without Composer
On this page you can find all versions of the php package koverae/koverae-billing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download koverae/koverae-billing
More information about koverae/koverae-billing
Files in koverae/koverae-billing
Package koverae-billing
Short Description 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.
License MIT
Homepage https://github.com/koverae/koverae-billing
Informations about the package koverae-billing
Koverae Billing - Manage plans, trials, and payments with clean, extensible logic.
- Vendor: koverae
- Package: koverae-billing
- Composer:
composer require koverae/koverae-billing
Support Policy
Version | Laravel | PHP | Release date | End of improvements | End of support |
---|---|---|---|---|---|
1.x [LTS] | ^11.0, ^12.0 | 8.2,8.3,8.4 | Apr 07, 2025 | May 1, 2026 | Sep 6, 2026 |
Upgrade Guide
To perform the migration, you will be helped by the instruction.
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: @koverae_billing
Usage
Once installed and configured, using koverae-billing
is straightforward and developer-friendly.
Models
koverae-billing
uses this models:
Add Billing Support to a Model
To start, add the HasSubscriptions
trait to any model you want to make billable (typically the User
model):
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.
Checking a User’s 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:
Cancel or Resume 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.
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
To cancel a subscription, simply use the cancel method on the user's subscription:
Immediatly
By default the subscription will remain active until the end of the period, you may pass true to end the subscription immediately:
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:
Uncancel a Subscription
To uncancel a subscription, simply use the uncancel
method on the user's subscription:
Scopes
Contributors
Code Contributors
This project exists thanks to all the people who contribute. [Contribute].
- Arden BOUET
- All Contributors
License
Forked originally from bpuig/laravel-subby. Thank you for creating the original! :)
The MIT License (MIT). Please see License File for more information.
© 2025 | Arden BOUET, Some rights reserved.