
Billing for Laravel
Provider-neutral billing for Laravel: subscriptions, invoices, metered usage, dunning, tax and e-invoicing. Stripe-first, on provider-neutral contracts.
This tree is the package's full documentation. The README is the showcase; everything below is the detail it used to carry.
Start here
- Choosing your setup — the six decisions to make before
billing:install, each with its config key and its default. - Choosing your mode — which of the four operating models you are in, what each one produces, and why three of them stay locked until you turn them on.
The guide
The whole surface for an app that sells its own product. Start at installation and read in order, or jump to what you need.
- Installation —
composer require,billing:install, the owner-columns migration - Configuration — the three config files and why billing and licensing are orthogonal
- Tiers and pricing — the tier catalog, the catalog services,
provider_price, the anti-price-injection allowlist, grandfathering - i18n and translations — publishing and overriding the translation namespace, adding a locale, the informal register, the parity gate
- Subscriptions — hosted checkout, in-app swap with proration preview, cancel-into-grace, resume, trials
- The account hub — the publishable Livewire screens, config-driven routes, the banner, hosting your own screens
- Usage-based billing — meters, included allowance, prepaid units, quota policies, oversell-safe metering
- Dunning and suspension — the dunning ladder, late fees, the 423 and 402 gates, the recovery screen
- Invoices and e-invoicing — the immutable
InvoiceRecord, XRechnung (UBL), ZUGFeRD (CII), the hybrid PDF/A-3, corrections - Taxes —
providervseu_ossvsnone, theTaxCalculatorseam, reverse charge on a validated VAT id - Accounting and DATEV — the EXTF booking batch, account numbers, the booking-field convention
- Webhooks — the endpoint, signature verification, idempotency, the shipped effects, replay
- Admin and support —
BillingAdmin, the optional Livewire console, the app-defined admin gate, the audit trail, metrics - Data protection —
billing:export,billing:erase,billing:prune, why invoices stay, the retention windows
Reference
- Configuration reference — every key in the three config files, its env variable and its default
- Command reference — every Artisan command, its cadence and exit behavior
- Event reference — the provider-neutral domain events and their payloads
- Contract reference — the extension seams and their guarantees
- Database reference — the package tables, their columns and what erasure does to each
Guides
- Upgrading — what each released version needs from you
- Migrating from your own billing code — adopt the package in place, one seam at a time
- Migrating from Cashier — adopt existing Cashier subscriptions with
billing:sync - Selling works to consumers — what the package tells you about a purchase so you can label it correctly, and what it deliberately leaves to you
- Testing —
Billing::fake(), asserting on domain events, cross-engine testing - Troubleshooting — what each fail-closed guard's error means
- Mounting your own payment element — why no front-end JavaScript ships, and the seam for putting the card fields on your own page
Marketplace
- Overview — routing a fan's payment to a connected merchant: the switch, the opt-in driver capability, the two eligibility gates, and the byte-identical single-seller guarantee
Compliance
- Invariants — the invariants the package enforces fail-closed
- Retention and erasure — the retention and deletion matrix
- Security — CSP, the PCI SAQ-A boundary, the webhook-secret guard, the admin gate, and the payment-services/e-money license line