PHPackages                             pushery/billing-for-laravel - 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. pushery/billing-for-laravel

ActiveLibrary[Payment Processing](/categories/payments)

pushery/billing-for-laravel
===========================

Provider-neutral billing for Laravel: subscriptions, invoices, metered usage, dunning, tax and e-invoicing. Stripe-first, on provider-neutral contracts.

v0.14.0(2w ago)2106↑925%MITPHPPHP ^8.4

Since Jul 16Pushed 1w agoCompare

[ Source](https://github.com/pushery/billing-for-laravel)[ Packagist](https://packagist.org/packages/pushery/billing-for-laravel)[ Docs](https://github.com/pushery/billing-for-laravel)[ RSS](/packages/pushery-billing-for-laravel/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (51)Versions (14)Used By (0)

 [ ![Billing for Laravel](art/header.png) ](https://github.com/pushery/billing-for-laravel)

Billing for Laravel
===================

[](#billing-for-laravel)

[![Latest Version](https://camo.githubusercontent.com/cf1e694e7a1d3fbc6ac732d31d4a673c7dc2a2e6b7e5047c7445c9e2fddb2800/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707573686572792f62696c6c696e672d666f722d6c61726176656c2e737667)](https://packagist.org/packages/pushery/billing-for-laravel)[![PHP Version](https://camo.githubusercontent.com/718e466cf05e5d9934026f7049a8d69db2a25909dadf497bd41d1c1f2358b41b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f707573686572792f62696c6c696e672d666f722d6c61726176656c2f7068702e737667)](https://packagist.org/packages/pushery/billing-for-laravel)[![Laravel Versions](https://camo.githubusercontent.com/c5bf335d221e09b2bd1916eb7f156efdaf16829bee558fec7fe31be8e8d1d00b/68747470733a2f2f62616467652e6c61726176656c2e636c6f75642f62616467652f707573686572792f62696c6c696e672d666f722d6c61726176656c3f7374796c653d666c6174)](https://packagist.org/packages/pushery/billing-for-laravel)[![License](https://camo.githubusercontent.com/cbc3a128448c0c746237dd802bf05b6c7b13909ca4d922535ce510dbd3610eae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f707573686572792f62696c6c696e672d666f722d6c61726176656c2e737667)](LICENSE)

[![Tests](https://camo.githubusercontent.com/1c80c8153fb9d8e06d8d3ee0c2296e711b6880bd186923d036b4b47dc666269b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d50657374253230352d3842433334412e737667)](https://pestphp.com)[![Coverage](https://camo.githubusercontent.com/b3545ae1bcdb4ea486f71f87b43001e82dd21933bc8035d44601706c851265da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e2e737667)](https://camo.githubusercontent.com/b3545ae1bcdb4ea486f71f87b43001e82dd21933bc8035d44601706c851265da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e2e737667)[![Type Coverage](https://camo.githubusercontent.com/0e276f61e1227fe953157aa346435d2ba910e0ae0f552c898a82002f3a243fce/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74797065732d3130302532352d627269676874677265656e2e737667)](https://camo.githubusercontent.com/0e276f61e1227fe953157aa346435d2ba910e0ae0f552c898a82002f3a243fce/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74797065732d3130302532352d627269676874677265656e2e737667)[![PHPStan](https://camo.githubusercontent.com/c47b2ba3238269b2d6f0e8c346934f4e94ee7ff7345c2738e62830182711717f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6d61782d626c75652e737667)](https://phpstan.org)[![Code Style](https://camo.githubusercontent.com/d1e49fbc2c712416be5a417fd3a8d339062c657ecbe46e4ada4dd0156dfd325f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d70696e742d6f72616e67652e737667)](https://laravel.com/docs/pint)[![Databases](https://camo.githubusercontent.com/746c3b1ab17a0bdaca37d764698febcaf417abd2a159e13a104c7e38418066f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7465737465642532306f6e2d506f737467726553514c2532302532422532304d7953514c2d3333363739312e737667)](https://camo.githubusercontent.com/746c3b1ab17a0bdaca37d764698febcaf417abd2a159e13a104c7e38418066f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7465737465642532306f6e2d506f737467726553514c2532302532422532304d7953514c2d3333363739312e737667)[![Mutation](https://camo.githubusercontent.com/94f64251638bd5166e17e55759fd4562ffe6eb814a936a26d3ee248ae36c46bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d75746174696f6e2d25453225383925413538352532352d626c756576696f6c65742e737667)](https://camo.githubusercontent.com/94f64251638bd5166e17e55759fd4562ffe6eb814a936a26d3ee248ae36c46bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d75746174696f6e2d25453225383925413538352532352d626c756576696f6c65742e737667)

Provider-neutral billing for Laravel: subscriptions, invoices, metered usage, dunning, tax and e-invoicing. Stripe-first, on provider-neutral contracts.

Everything crosses a small set of contracts, so your app talks to *billing* — not to Stripe. The Stripe driver ships today. The contracts are the seam a second provider slots into.

Highlights
----------

[](#highlights)

- **Two-layer, provider-neutral core** — `PaymentRails` (moves money, stores mandates) and `BillingEngine` (the recurring cycle). Money crosses the boundary as a `Money` value object, never a raw provider response.
- **Subscriptions** — in-app upgrade/downgrade **swap** with a proration **preview**, cancel-into-grace, resume, and immediate cancel — the client submits a tier *key*, never a price (anti-price-injection).
- **Account hub** — a publishable Livewire hub (overview, subscription, change-plan, payment methods, invoices, usage, payment recovery, danger zone) with config-driven routes and a self-contained Blade view set. Drop a `` into your layout to surface a failed payment, a lapsing grace period or a trial about to end.
- **Webhooks** — an idempotent, signature-verified backbone with effects out of the box (plan-sync, add-on credit, dunning notice, invoice persistence) and a fail-loud webhook-secret guard.
- **Usage-based billing** — charge a base fee *plus* what a customer actually used, with a retry that cannot double-bill, an outage that cannot silently lose revenue, oversell-safe reserve/work/settle metering, quota policies, and prepaid units that never expire.
- **Entitlements &amp; seats** — a separate `License` gate for what a tier *unlocks* (feature grants + numeric limits), independent of what it costs, plus team seats and a User-XOR-Team owner model.
- **Dunning, suspension &amp; tax** — a config-driven multi-level dunning ladder, a per-surface `423 Locked` suspension gate driven by a stored delinquency clock (outage-safe), and provider tax (Stripe Tax) on the invoice with a pluggable `TaxCalculator` seam for a local computation path.
- **E-invoicing** — dependency-free **EN 16931** writers in both syntaxes (**XRechnung** UBL and **ZUGFeRD / Factur-X** CII), an optional hybrid **PDF/A-3** embed, and a **DATEV** (EXTF Buchungsstapel) export.
- **Security-first** — a `billing.enabled` master switch that makes the whole surface disappear, a scoped Content-Security-Policy for the hub, a fail-closed money-eligibility gate, and card capture that happens on the provider's own hosted page, so no card data ever touches your app (PCI SAQ-A).

Requirements
------------

[](#requirements)

- PHP 8.4+
- Laravel 13+

Tested against SQLite, PostgreSQL and MySQL 8.4, so it runs on Laravel Cloud (serverless Postgres and MySQL 8.4 LTS) out of the box.

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

[](#installation)

```
composer require pushery/billing-for-laravel
php artisan billing:install
php artisan migrate
```

The service provider is registered through package discovery. The Stripe driver builds on [Cashier](https://laravel.com/docs/billing), so set your Stripe keys (`STRIPE_KEY`, `STRIPE_SECRET`, `STRIPE_WEBHOOK_SECRET`) as usual.

> **Billable model isn't `App\Models\User`?** Set `BILLING_CUSTOMER_MODEL` **before** you run `billing:install`, or it adds the billing columns to `users`. See the [installation guide](https://docs.pushery.com/billing-for-laravel/single-seller/installation) for the full detail.

Documentation
-------------

[](#documentation)

The full documentation lives at **[docs.pushery.com/billing-for-laravel](https://docs.pushery.com/billing-for-laravel/)** — start there. (It is published as a site rather than carried in the repository, so these links point outward and an installed package stays unchanged.)

- **New here?** [Choosing your setup](https://docs.pushery.com/billing-for-laravel/choosing-your-setup), then the [guide](https://docs.pushery.com/billing-for-laravel/#the-guide) (installation → configuration → subscriptions → usage → invoicing → …).
- **Reference:** [configuration](https://docs.pushery.com/billing-for-laravel/reference/configuration) · [commands](https://docs.pushery.com/billing-for-laravel/reference/commands) · [events](https://docs.pushery.com/billing-for-laravel/reference/events) · [contracts](https://docs.pushery.com/billing-for-laravel/reference/contracts) · [database](https://docs.pushery.com/billing-for-laravel/reference/database)
- **Guides:** [migrating from Cashier](https://docs.pushery.com/billing-for-laravel/guides/migrating-from-cashier) · [migrating from your own billing code](https://docs.pushery.com/billing-for-laravel/guides/migrating-from-custom-billing) · [testing](https://docs.pushery.com/billing-for-laravel/guides/testing) · [upgrading](https://docs.pushery.com/billing-for-laravel/guides/upgrading) · [troubleshooting](https://docs.pushery.com/billing-for-laravel/guides/troubleshooting)
- **Compliance:** [invariants](https://docs.pushery.com/billing-for-laravel/compliance/invariants) · [retention &amp; erasure](https://docs.pushery.com/billing-for-laravel/compliance/retention-and-erasure) · [security](https://docs.pushery.com/billing-for-laravel/compliance/security)

Security
--------

[](#security)

The card is captured on the provider's own hosted page, so no card data ever touches your app (PCI SAQ-A), and the webhook backbone refuses to boot in production without a signing secret. Please review the [security policy](SECURITY.md) and report vulnerabilities privately rather than opening a public issue.

Built by Pushery
----------------

[](#built-by-pushery)

This package is built and maintained by [Pushery](https://www.pushery.com) — a Berlin-based studio building Laravel applications, SaaS products, and open-source tools.

Building a Laravel UI? [WireKit](https://wirekit.app), Pushery's open-source Livewire component kit, gives you a themeable component library out of the box. Browse the rest of our work at [pushery.com](https://www.pushery.com).

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE) for details.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance97

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Total

13

Last Release

17d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b684549435f88b531446bf3d993ab1ec3c5a4f3a8b6409a6f60f9836a964fc0f?d=identicon)[pushery](/maintainers/pushery)

---

Top Contributors

[![pushery](https://avatars.githubusercontent.com/u/272318911?v=4)](https://github.com/pushery "pushery (16 commits)")

---

Tags

billinginvoiceinvoicesinvoicinglaravellaravel-packagemetered-billingmulti-tenantpayment-gatewaypaymentsphpphp8saasstripesubscriptionsubscription-managementsubscriptionssubscriptions-and-paymentstaxxrechnunglaravelstripebillingpaymentssubscriptionsxrechnunginvoicessaascashiere-invoicingmetered billingdatevdunningusage-based-billing

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pushery-billing-for-laravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/cashier

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

2.5k31.8M168](/packages/laravel-cashier)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[illuminate/notifications

The Illuminate Notifications package.

513.2M1.3k](/packages/illuminate-notifications)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M276](/packages/laravel-mcp)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

1.0k2.5M153](/packages/roots-acorn)

PHPackages © 2026

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