Skip to main content

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 behind it.

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 two marketplace modes run on Stripe only.

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
  • AI costs and spend caps — what a laravel/ai call cost, priced from its tokens at a dated rate, and daily caps per provider and per owner
  • 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 — provider vs eu_oss vs none, the TaxCalculator seam, 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​

Guides​

Marketplace​

  • Overview — routing a fan's payment to a connected merchant on Stripe: 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