Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Cashier Braintree Laravel Package

genealabs/laravel-cashier-braintree

Laravel Cashier Braintree brings Braintree payment handling to Laravel's Cashier API, offering subscriptions, one-off charges, and customer management through a familiar fluent interface.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package occupies a well-defined slot: it implements Laravel Cashier's billing contract — the Billable trait, subscriptions/subscription_items schema, a webhook controller, and fluent newSubscription() / swap() / charge() / refund() builders — on top of the Braintree PHP SDK. That is the right architectural shape for a single-database Laravel monolith that has already committed to Braintree. For a TPM, the value is mostly in the shape, not the artifact: it converts "design a subscription state machine" into "configure a documented integration," which is where most schedule risk in a first paid tier actually lives. It is explicitly not a payment abstraction layer — it does not decouple you from Braintree — and it does not cover tax-compliant invoicing, revenue recognition, metered/usage-based rating, dunning tooling, or a billing operations console. Write the epic against that boundary.

A TPM's most defensible use of this repo is as a reference implementation. The 4.0.0 README carries the full Cashier documentation, so the team can spec trials, proration, swaps, cancel-at-period-end, cancelNow, resume, charge, and refund against a concrete, readable contract before writing a line of production code. That is a scope-and-estimate artifact with real value even if the dependency is ultimately rejected.

Integration feasibility — mechanically high, strategically low. Install is ordinary Composer work: require the package, publish config and migrations, add fields (braintree_id, paypal_email, card_brand, card_last_four, trial_ends_at), attach the trait to the billable model, set BRAINTREE_ENVIRONMENT/MERCHANT_ID/PUBLIC_KEY/PRIVATE_KEY, and exclude braintree/* from CSRF. Nothing novel. The real feasibility question is not "can we install it" but "should we depend on it," and on that question the evidence is poor.

Technical risk: high, dominated by project health rather than code quality. 5 stars, 0 dependents, last release 2019-10-09, repository archived read-only. Concretely:

  • No security or compatibility response path. No CVE triage, no patch for an SDK advisory, no fix for a Laravel or PHP incompatibility. The 4.x Braintree SDK line named in the release notes is several majors behind — you inherit drift you cannot resolve upstream.
  • Dependency-lock hazard is the top risk and it is platform-level. Pinning an abandoned billing library can block Laravel and PHP security upgrades for the entire application. That blast radius dwarfs the billing feature that motivated the dependency; it belongs in the risk register as an application-wide item, not a billing item.
  • The 4.0.0 notes are thin — docs ported, tests green, SDK bumped — with no breaking-change list and no Laravel/PHP support matrix. A major version with no migration notes is an audit task.
  • Correctness lives where the package is thinnest. Webhook signature verification, idempotency on retries, payment-method update semantics, disputes, and reconciliation are the actual failure surface. Nothing in the notes evidences that the failure path is tested.

Key questions to force answers before commitment:

  1. What Laravel/PHP versions does this actually support — verified by running the suite against our real composer.json, not inferred from the README?
  2. Does it still function against a currently supported braintree/braintree_php, or is the 4.x pin itself a blocker?
  3. Who owns the fork, and what is the funded 24-month maintenance estimate (patches, Laravel majors, SDK bumps, security response)?
  4. Are webhook signature validation, idempotency, and retry behavior covered by tests we can read?
  5. What is the exit cost to Cashier-for-Stripe/Paddle, or to a thin first-party Braintree SDK wrapper?
  6. Was Braintree a deliberate product decision (PayPal/Venmo reach, international, pricing), or a side effect of finding this package first?

Integration Approach

Stack fit. Viable only where (a) Braintree is already the gateway, (b) the Laravel/PHP combination is contemporaneous with a 2019 release, and (c) pricing is standard subscription with no metering, tax-inclusive invoicing, or multi-entity revenue reporting. On a modern Laravel app, expect dependency-resolution conflicts before any runtime bug — and treat that resolver failure as the cheapest possible go/no-go signal. Run it in a throwaway branch in week one.

Migration path. Do not add a floating ^4.0 requirement. The only defensible path is a vendored fork pinned to a commit SHA, owned in an internal namespace, with adoption gated on a compatibility spike. Sequence with explicit gates so the decision is reversible at each one:

  1. Gate 0 — gateway decision. Braintree vs. Stripe vs. Paddle is a multi-year product choice (checkout UX, PayPal/Venmo coverage, international reach, dispute handling, support-queue shape). This package is downstream of that decision and must never be the reason for it. Record the decision and its rationale; it is the assumption every later gate rests on.
  2. Gate 1 — compatibility spike. Resolve against our actual composer.json, run the package suite, capture failures. Cheap, time-boxed, and decisive.
  3. Gate 2 — sandbox walkthrough. Exercise end-to-end: trial + coupon subscription, swap with and without proration, quantity update, cancel-at-period-end, cancelNow, resume, charge, refund, and a signed webhook. This produces the real estimate.
  4. Gate 3 — build-vs-fork decision. Price the alternative in the same breath: a thin first-party wrapper over the Braintree SDK is typically a few weeks and strictly more auditable. Present both to the decision owner as a costed comparison, not a preference.
  5. Gate 4 — fork and own (if chosen): internal namespace, pinned SHA, named owner, upgrade calendar, and a CI job that fails loudly on dependency drift against our framework and PHP baseline.

Compatibility. There is no published support matrix. Treat the README as a frozen 2019 snapshot of upstream Cashier docs rather than a statement of what this package supports. Compatibility must be established empirically and re-verified on every Laravel, PHP, or Braintree SDK bump — that recurring verification is part of the estimate, not a one-time spike.

Sequencing note for the roadmap. Billing becomes load-bearing the moment the first real charge lands, and after that the exit options get expensive. Fix the exit plan before launch, not after.

Operational Impact

Maintenance. Adoption books a recurring cost line that no upstream will fund: dependency patching, framework and PHP compatibility, security response, and SDK bumps. Assign a named owner with allocated capacity and a documented upgrade calendar; without that, "fork and own" degrades into "fork and neglect." A fork with a bus factor of one is a schedule risk on every future framework upgrade. Budget the 24-month number explicitly and put it in the business case next to the time-to-market savings, or the comparison is dishonest.

Support. There is no SLA, no maintainer, and no support contact. Recurring billing is high blast radius — a dropped webhook means wrong entitlements or wrong charges — so a dedicated on-call path, webhook replay tooling, and reconciliation reports must be budgeted alongside the feature, not retrofitted after the first incident. Write the runbook for failed payments, dunning, disputed charges, and webhook replay before launch, and rehearse it once. Include a tested rollback path and a documented procedure for reconciling our subscription state against Braintree's as the source of truth.

Scaling. At moderate subscription volume the package itself is unlikely to be the bottleneck; queue workers and webhook throughput are ordinary Laravel capacity planning. The real scaling constraint is organizational: a single fork owner cannot absorb an urgent security patch during a Laravel major upgrade. Plan for at least two engineers able to touch the fork.

Failure modes to track in the risk register.

  • Silent breakage after a PHP or Laravel upgrade, discovered in production rather than CI.
  • A Braintree SDK security advisory with no available patch through this package.
  • Dependency resolution deadlock blocking a framework security upgrade for the whole application.
  • Missed idempotency causing double charges on webhook retries.
  • Webhook signature verification gaps allowing forged subscription state changes.
  • Drift between our subscription records and Braintree's, surfacing as entitlement or billing disputes.

Each needs an owner, a detection mechanism, and a mitigation — not just a line in a document.

Ramp-up. The copied documentation is genuinely useful for onboarding engineers to the Cashier contract and for writing the first-party spec; it is misleading if read as a statement of current support. Plan for a sandbox spike plus pairing so the team learns where correctness actually lives — signature verification, idempotency, retries, reconciliation — rather than learning the happy path and discovering the failure path in production. The Drop-in UI keeps card data out of our systems, a durable PCI-surface reduction that holds regardless of how the package-health question resolves, and it is worth stating plainly in the compliance narrative.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums