shapin/stripe
A lightweight Laravel integration for Stripe that wraps the official Stripe PHP SDK with a simple, expressive API. It helps streamline common billing tasks like customers, payments, subscriptions, and webhook handling in PHP applications.
Architecture fit. This package would sit directly beneath the monetization surface — checkout, subscriptions, invoicing, billing portal, and webhook-driven lifecycle events. That placement makes the build/buy/fork decision the real architectural question, not the Laravel ergonomics. On the evidence available, shapin/stripe is best understood as a thin wrapper or private fork around stripe/stripe-php rather than a distinct capability. If that holds, it adds an abstraction layer without adding product capability, and it places a low-visibility dependency on the one path where failure means "we cannot take money."
Integration feasibility. Mechanical integration is trivial: composer require shapin/stripe, service-provider auto-discovery, a published config file, two env vars, and a sandbox round-trip (create customer, create PaymentIntent). Friction is not installation — it is provenance. With 4 stars, 0 dependents, and a 0.02 health score, there is no usage signal, no third-party confirmation of correctness under real payment traffic, and no ecosystem to lean on when behavior diverges from the official SDK.
Technical risk. High and concentrated in the payment path. Ranked by severity:
| Risk | Why it matters | TPM disposition |
|---|---|---|
| Provenance unknown | Fork vs. independent reimplementation of Stripe's REST API are very different liabilities | Blocking question; source read required before any POC |
| Single-maintainer / abandonment | An abandoned wrapper on the payment path blocks framework and PHP upgrades | Assume self-maintained unless a contract exists |
| Stripe API drift | Stripe deprecates behaviors continuously; a pinned wrapper silently ages | Requires an owned upgrade cadence |
| Security surface | API keys, webhook signatures, and card-adjacent code raise review and supply-chain burden | Mandatory security review before production |
| Bus factor / support | 2 a.m. charge failure means reading source, not Stack Overflow | Quantify on-call cost explicitly |
Key questions (each with the decision it unblocks):
stripe/stripe-php, and how far has it drifted? — If it is a thin, current fork, most risk collapses and a POC is cheap; if it reimplements HTTP calls, stop.TPM recommendation. Do not adopt as the primary billing foundation. Standardize on stripe/stripe-php directly, or laravel/cashier where subscription and portal ergonomics matter, wrapped behind a first-party PaymentGateway interface. Treat shapin/stripe as out of scope unless questions 1, 2, and 3 all resolve favorably and question 4 yields a measurable win.
Stack fit. Composer-native, so it fits any Laravel or Lumen app with a service provider and config publish. Fit is not the constraint; supportability is. The recommended target state is official SDK + a thin internal adapter (or Cashier for subscriptions), which gives equivalent Laravel ergonomics with vendor-backed maintenance.
Migration path. Two distinct cases:
Adopting fresh is the harder case to justify and should be gated, not assumed.
Compatibility. Validate before any code is written: PHP version bounds against the runtime, Laravel/Lumen constraints, Stripe API version pinning, and transitive dependency collisions with the host app. Because update cadence is unverified, assume dependency conflicts will appear at the next framework or PHP bump and plan for them as a known cost, not a surprise.
Sequencing.
stripe-php if forked. Owner: engineering lead. Exit: written verdict on wrap-vs-reimplement.PaymentGateway abstraction so the SDK is swappable, with a kill switch and webhooks as the source of truth. Queue all network-bound billing work; pass idempotency keys derived from internal order IDs.Maintenance. The dominant cost. A 4-star, 0-dependent package has no downstream pressure to stay current, so the adopting team inherits Stripe API tracking, security patching, and framework compatibility work that the official SDK offloads to Stripe. Budget this as a recurring line item, not a one-time integration cost.
Support. No meaningful community footprint, issue traffic, or commercial backing. On-call engineers will debug production charge failures by reading source. That is an acceptable trade only if the team is small, stable, and explicitly owns the package.
Scaling. The package itself is thin HTTP I/O and will not be a throughput bottleneck; load lives in the Stripe account and the host app. The real scaling constraint is organizational: every additional engineer and every new payment feature (dunning, proration, multi-currency, tax) multiplies the cost of an unsupported dependency and the surface area that must be re-verified after any fork update.
Failure modes.
stripe-php advisories and diff on a cadence.Ramp-up. Technical ramp is low if the API mirrors the official SDK — engineers transfer their Stripe knowledge directly. Organizational ramp is where the cost sits: establishing ownership, a review process for upstream changes, a runbook for webhook and charge failures, and an escalation path. For revenue-critical code the burden of proof is on the third-party package, and on this evidence — 4 stars, 0 dependents, unverified provenance — it does not clear the bar.
How can I help you explore Laravel packages today?