ptuchik/billing
ptuchik/billing is a Laravel package for adding billing and subscription management to your app. It provides models and traits for plans, subscriptions, invoices, payments, coupons, and transactions, helping you implement recurring billing and track charges with less custom code.
Architecture fit: ptuchik/billing is a Laravel 5.5-era package that models the common SaaS billing domain: packages, plans, coupons, addons, payments, and subscriptions. It fits a legacy Laravel monolith that already uses Eloquent, service providers, config publishing, and migrations. It is a poor architectural fit for a new headless/API-first platform, a modern Laravel application, or a billing system expected to support complex revenue operations without significant custom work. The TPM should treat it as an accelerator for a constrained legacy MVP, not as a strategic billing platform.
Integration feasibility: Initial integration is likely straightforward for a Laravel 5.5 application: install via Composer, publish config and migrations, run migrations, attach billing traits/models to the existing user/customer model, and configure payment gateway credentials. Real feasibility depends on undocumented assumptions: supported gateway(s), webhook handling, subscription lifecycle events, coupon validation rules, proration behavior, refunds, invoices, taxes, and multi-currency support. The package may provide the data model and core flows but not the payment-provider hardening expected in production.
Technical risk: High. The package has low adoption (30 stars), targets an end-of-life Laravel version, and likely carries PHP/runtime compatibility constraints. Billing is a high-blast-radius domain: duplicate charges, missed renewals, incorrect proration, coupon abuse, tax errors, and payment webhook failures create direct financial and compliance exposure. Payment security, PCI scope, SCA/PSD2, idempotency, audit trails, and reconciliation are likely not fully addressed by a small community package. A TPM should assume the team must fork, harden, and own the code if used in production.
Key questions:
Stack fit: Best fit is an existing Laravel 5.5/PHP 7.x application with MySQL/PostgreSQL and Eloquent-based domain models. It is not a drop-in fit for Laravel 8+, PHP 8+, event-driven billing, or a separate billing service. If the target stack is modern Laravel, the TPM should evaluate Laravel Cashier, Stripe Billing, Paddle, or a custom billing adapter instead.
Migration path: Run a time-boxed spike in a non-production environment. Install the package, publish migrations/config, seed representative plans/coupons, connect a sandbox payment gateway, and exercise signup, upgrade, downgrade, renewal, coupon, addon, payment failure, and refund flows. Build an anti-corruption layer around the package so domain code does not depend directly on its models or gateway assumptions. If the spike fails, fall back to a maintained billing provider or fork the package with explicit ownership.
Compatibility: Verify Composer constraints against the application’s Laravel, PHP, database, queue, and payment SDK versions. Check whether the package’s migrations conflict with existing tables, whether it assumes a specific user model, and whether its gateway integration supports the required payment methods and webhook signatures. Confirm PHP 7.x runtime support and whether the package can run on a supported PHP version; if not, the risk increases materially.
Sequencing:
Maintenance: Expect low community support and possible abandonment. The team should budget for an internal owner, a maintained fork, dependency/security patching, and periodic compatibility work. This is not a “install and forget” dependency in a revenue-critical path.
Support: Vendor support is unlikely. Operational support depends on code readability, documentation quality, and the team’s ability to debug payment-provider edge cases. TPM should require runbooks for renewal failures, webhook replays, refunds, coupon disputes, and reconciliation.
Scaling: The package can likely support small-to-moderate subscription volumes if queries are indexed, renewals run through queued jobs, and webhooks are processed asynchronously with idempotency. High-volume billing, complex proration, multi-currency, or multi-tenant B2B scenarios will require significant customization and performance validation.
Failure modes: Watch for missed or duplicated webhooks, duplicate charges, failed renewal retries, stale subscription state, coupon redemption errors, proration mistakes, gateway downtime, migration data drift, and unpatched security vulnerabilities from the EOL stack. Require audit logs, dead-letter queues, alerting, and daily reconciliation against the payment provider.
Ramp-up: A Laravel developer can likely complete a sandbox spike in one to two days. Production hardening with payment gateway integration, webhook reliability, migration, and reconciliation is more realistically one to three weeks for a small team, plus security/compliance review. The TPM should gate production use on a successful payment-provider sandbox, reconciliation evidence, and an explicit fork/ownership decision.
How can I help you explore Laravel packages today?