{"id":26151390,"url":"https://github.com/koverae/koverae-billing","last_synced_at":"2026-02-28T20:02:12.495Z","repository":{"id":280349317,"uuid":"941390614","full_name":"Koverae/koverae-billing","owner":"Koverae","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.","archived":false,"fork":false,"pushed_at":"2025-05-17T18:18:26.000Z","size":1834,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T15:30:27.814Z","etag":null,"topics":["billing","koverae","laravel","livewire","package","paystack","subscription","subscription-manager"],"latest_commit_sha":null,"homepage":"https://developer.koverae.com/koverae-billing/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Koverae.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-02T07:03:31.000Z","updated_at":"2025-05-17T18:18:30.000Z","dependencies_parsed_at":"2025-03-23T09:23:58.012Z","dependency_job_id":"76e45ad7-9fba-48f5-8d24-8807e7d7a8c4","html_url":"https://github.com/Koverae/koverae-billing","commit_stats":null,"previous_names":["koverae/koverae-billing"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/Koverae/koverae-billing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Koverae%2Fkoverae-billing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Koverae%2Fkoverae-billing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Koverae%2Fkoverae-billing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Koverae%2Fkoverae-billing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Koverae","download_url":"https://codeload.github.com/Koverae/koverae-billing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Koverae%2Fkoverae-billing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29951063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["billing","koverae","laravel","livewire","package","paystack","subscription","subscription-manager"],"created_at":"2025-03-11T06:33:56.035Z","updated_at":"2026-02-28T20:02:12.487Z","avatar_url":"https://github.com/Koverae.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Koverae Billing](https://github.com/Koverae/koverae-billing/blob/main/public/images/koverae-billing.png)\n\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/koverae/koverae-billing.svg?style=flat-square)](https://packagist.org/packages/koverae/koverae-billing)\n[![Total Downloads](https://img.shields.io/packagist/dt/koverae/koverae-billing.svg?style=flat-square)](https://packagist.org/packages/koverae/koverae-billing)\n![GitHub Actions](https://github.com/koverae/koverae-billing/actions/workflows/main.yml/badge.svg)\n\n[![Sparkline](https://stars.medv.io/bavix/laravel-wallet.svg)](https://stars.medv.io/bavix/laravel-wallet)\n\nKoverae Billing - Manage plans, trials, and payments with clean, extensible logic.\n\n[[Documentation](https://developer.koverae.com/koverae-billing/)] \n[[Get Started](https://developer.koverae.com/koverae-billing/guide/introduction/)] \n\n* **Vendor**: koverae\n* **Package**: koverae-billing\n* **[Composer](https://getcomposer.org/):** `composer require koverae/koverae-billing`\n\n### Support Policy\n\n| Version    | Laravel        | PHP             | Release date | End of improvements | End of support      |\n|------------|----------------|-----------------|--------------|---------------------|----------------|\n| 1.x [LTS] | ^11.0, ^12.0   | 8.2,8.3,8.4     | Apr 07, 2025 | May 1, 2026         | Sep 6, 2026    |\n\n### Upgrade Guide\n\nTo perform the migration, you will be [helped by the instruction](https://developer.koverae.com/koverae-billing/#/upgrade-guide).\n\n### Community\n\nI 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.\n\n![telegram](https://github.com/Koverae/koverae-billing/blob/main/public/images/billing-telegram.jpg)\n\n\nTelegram: [@koverae_billing](https://t.me/koverae_billing)\n\n### Usage\nOnce installed and configured, using `koverae-billing` is straightforward and developer-friendly.\n\n#### Models\n`koverae-billing` uses this models:\n\n```php\nKoverae\\KoveraeBilling\\Models\\Plan;\nKoverae\\KoveraeBilling\\Models\\PlanCombination;\nKoverae\\KoveraeBilling\\Models\\PlanFeature;\nKoverae\\KoveraeBilling\\Models\\PlanSubscription;\nKoverae\\KoveraeBilling\\Models\\PlanSubscriptionFeature;\nKoverae\\KoveraeBilling\\Models\\PlanSubscriptionSchedule;\nKoverae\\KoveraeBilling\\Models\\PlanSubscriptionUsage;\n```\n\n#### Add Billing Support to a Model\n\nTo start, add the `HasSubscriptions` trait to any model you want to make billable (typically the `User` model):\n\n```php\nuse Koverae\\KoveraeBilling\\Concerns\\HasSubscriptions;\n\nclass User extends Authenticatable\n{\n    use HasSubscriptions;\n}\n```\n\n#### Subscribing a User to a Plan\n\nYou 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.\n\n```php\n$user = User::find(1);\n$plan = Plan::find(1);\n\n$user-\u003enewSubscription(\n            'main', // identifier tag of the subscription. If your application offers a single subscription, you might call this 'main' or 'primary'\n             $plan, // Plan or PlanCombination instance your subscriber is subscribing to\n             'Main subscription', // Human-readable name for your subscription\n             'Customer main subscription', // Description\n             null, // Start date for the subscription, defaults to now()\n             'free' // Payment method service defined in config\n             );\n```\n\n### Checking a User’s Subscription\nFor a subscription to be considered active one of the following must be true:\n- Subscription has an active trial.\n- Subscription `ends_at` is in the future.\n\nAlternatively you can use the following methods available in the subscription model:\n\n```php\n$user-\u003esubscription('main')-\u003eisActive();\n$user-\u003esubscription('main')-\u003eisCanceled();\n$user-\u003esubscription('main')-\u003ehasEnded();\n$user-\u003esubscription('main')-\u003ehasEndedTrial();\n$user-\u003esubscription('main')-\u003eisOnTrial();\n\n// To know if subscription has the same values as related plan or has been changed\n$user-\u003esubscription('main')-\u003eisAltered();\n```\n\n### Cancel or Resume a Subscription\n#### Renew a Subscription\nTo 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.\n\n```php\n$user-\u003esubscription('main')-\u003erenew();\n\n$user-\u003esubscription('main')-\u003erenew(3); // This will triple the periods. CAUTION: If your subscription is 2 'month', you'll get 6 'month'\n```\n\nCanceled subscriptions can't be renewed. Renewing a subscription with trial period ends it.\n\nWhen 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\n\n#### Cancel a Subscription\n\nTo cancel a subscription, simply use the cancel method on the user's subscription:\n\n```php\n$user-\u003esubscription('main')-\u003ecancel();\n```\n\n##### Immediatly\nBy default the subscription will remain active until the end of the period, you may pass true to end the subscription immediately:\n\n```php\n$user-\u003esubscription('main')-\u003ecancel(true);\n```\n\n##### Fallback plan\nIf a `fallback_plan_tag` is not `null` in config, when `cancel` is called, subscription will not be canceled but changed to fallback plan.\n\nTo cancel subscription and ignore fallback, a second parameter is available on `cancel` method:\n\n```php\n$user-\u003esubscription('main')-\u003ecancel(false, true);\n```\n\n#### Uncancel a Subscription\nTo uncancel a subscription, simply use the `uncancel` method on the user's subscription:\n\n```php\n$user-\u003esubscription('main')-\u003euncancel();\n```\n\n#### Scopes\n\n```php\n// Get subscriptions by plan\n$subscriptions = PlanSubscription::byPlanId($planId)-\u003eget();\n\n// Get bookings of the given user\n$user = \\App\\Models\\User::find(1);\n$bookingsOfUser = PlanSubscription::ofSubscriber($user)-\u003eget(); \n\n// Get subscriptions with trial ending in 3 days\n$subscriptions = PlanSubscription::findEndingTrial(3)-\u003eget();\n\n// Get subscriptions with ended trial\n$subscriptions = PlanSubscription::findEndedTrial()-\u003eget();\n\n// Get subscriptions with period ending in 3 days\n$subscriptions = PlanSubscription::findEndingPeriod(3)-\u003eget();\n\n// Get subscriptions with ended period\n$subscriptions = PlanSubscription::findEndedPeriod()-\u003eget();\n\n// Get subscriptions with period ending in 3 days filtered by the subscription tag\n$subscriptions = PlanSubscription::getByTag('company')-\u003efindEndingPeriod(3)-\u003eget();\n```\n\n## Contributors\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n-   [Arden BOUET](https://github.com/arden28)\n-   [All Contributors](../../contributors)\n\n\n## License\n\nForked originally from [bpuig/laravel-subby](https://github.com/bpuig/laravel-subby). Thank you for\ncreating the original! :)\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n\u0026copy; 2025 | Arden BOUET, Some rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoverae%2Fkoverae-billing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoverae%2Fkoverae-billing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoverae%2Fkoverae-billing/lists"}