Download the PHP package cleaniquecoders/laravel-billing without Composer

On this page you can find all versions of the php package cleaniquecoders/laravel-billing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-billing

Laravel Billing

A gateway-agnostic subscription & invoicing engine for Laravel — with an optional Livewire + Flux billing UI. One package to maintain — payment gateways are an extension point (a contract), not separate packages. Ships a built-in local gateway so any app has working billing on day one, plus optional, publishable customer-facing pages (plans, subscription management, invoices, receipts) — ideal for demo, development, UAT, and testing.

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Why this design

Installation

Publish the config and (if using the database plan store) the migrations:

Optionally publish the invoice/checkout views and the plan seeder:

A fresh install defaults to BILLING_GATEWAY=local, so demo/UAT works before any merchant account exists.

To use the optional billing UI, install Livewire and Flux in your app (the package guards on their presence, so this is only needed if you enable the UI):

Make a model billable

Any model becomes billable by implementing the Billable contract and using the HasSubscriptions trait.

HasSubscriptions provides billingEmail(), billingName() and billingAddress() defaults (override as needed) plus:

Plans — config and/or database

config('billing.plans') is always the canonical source. The store setting decides where reads come from:

Limits are an open map (seats, messages_per_month, api_calls, …) — your app declares which meters exist. A null limit means unlimited.

Subscribe flow

checkout() creates a pending (Incomplete) subscription, delegates to the active driver, and correlates the eventual webhook by externalId. With the local gateway:

Webhooks (your app wires the route, the package does the work)

Billing::handle() replay-guards on providerEventId, locates the subscription by gateway_subscription_id/externalId, transitions status, calls IssueInvoice on activate/renew, and fires the matching event.

Write your own gateway

Implement the single extension point and register the driver class in config. That's the entire surface.

The manager resolves the class through the container, so constructor injection works. You can also register a driver at runtime:

Events

Listen to drive your own side effects (provision access, dunning, Slack notifications). The package itself only updates subscription/invoice state and issues invoices.

SubscriptionActivated · SubscriptionRenewed · SubscriptionCanceled · PaymentSucceeded · PaymentFailed · InvoiceIssued

Invoicing

Invoices use atomic, row-locked sequential numbering (INV-2026-000001) and are rendered to PDF from a brandless, SST/SSM-aware Blade template, stored via Laravel's Filesystem (disk configurable). Set seller details under config('billing.company'). Publish and override resources/views/vendor/billing/invoice-pdf.blade.php to brand it.

Billing UI (optional)

The package ships a Livewire + Flux UI that closes the full subscribe → pay → invoice → receipt loop. It is opt-in and scoped to the authenticated billable.

Plans Billing portal

More screenshots and the full walkthrough: Billing UI docs.

Requires livewire/livewire and livewire/flux in your app. Enable and scope it in config('billing.routes'):

That registers:

Route Name What it shows
GET /billing/plans billing.plans Plan cards with monthly/annual toggle; Subscribe runs Billing::checkout()
GET /billing billing.portal Overview (current subscription, cancel/resume) + Invoices tab with a detail modal
GET /billing/success billing.success Payment-success receipt card (amount, number, Download invoice / receipt)
GET /billing/invoices/{invoice:uuid}/download billing.invoices.download Streams the stored invoice PDF
GET /billing/invoices/{invoice:uuid}/receipt billing.invoices.receipt Streams a receipt PDF derived from the paid invoice

The billable is resolved via config('billing.billable_resolver') (defaults to request()->user()); set it to scope billing to a Team/Workspace. Every query is constrained to that billable, and the download/receipt routes 403 on a foreign invoice. Publish laravel-billing-views to override the Flux markup.

Component ownership — package vs your app

Lives in the package Lives in your app
Contracts\PaymentGateway, Contracts\Billable Concrete gateway drivers (BayarCashGateway, …)
Gateways\LocalGateway (bundled default) The real gateway SDK dependency
Models, migrations, enums, DTOs, events The Billable model + use HasSubscriptions
IssueInvoice, PlanRepository, BillingManager, facade Custom routes/UI beyond the bundled pages, access-control middleware
Webhook dispatcher Billing::handle() The webhook route + any environment/tenancy gating
Brandless invoice PDF template + InvoiceIssuedMail Company/tax config values, branded template override
Optional Livewire + Flux billing UI (publishable, overridable) Enabling/scoping the routes, livewire/flux install, branding

UI: the package ships an optional Livewire + Flux billing UI (plans, subscription, invoices, receipts) plus the dev-only local checkout page. It is opt-in — disable billing.routes.enabled (or skip installing livewire/flux) and the package stays fully headless. Publish and override the views to brand them, or build your own pages against the same models and facade.

Documentation

Full documentation lives in docs/:

Testing

Preview the UI locally (Testbench workbench)

The package ships a Testbench workbench so you can click through the full subscribe → pay → invoice → receipt flow with the real Flux UI:

Open the root URL — it auto-logs in a demo billable and lands on /billing/plans. The workbench (workbench/, testbench.yaml) configures a demo plan matrix (config store), the local gateway with the dev "Approve" checkout page, and SST tax — mirroring what a host app sets in config/billing.php.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-billing with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
barryvdh/laravel-dompdf Version ^3.1
cleaniquecoders/traitify Version ^1.4
dompdf/dompdf Version ^3.1
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cleaniquecoders/laravel-billing contains the following files

Loading the files please wait ...