Laravel Stripe Subscription Pipeline

Заказчик: AI | Опубликовано: 17.01.2026
Бюджет: 250 $

I need my existing Laravel app to handle paid subscriptions through Stripe, and I want the whole flow architected with Laravel’s Pipeline feature so each step is clean, testable, and easy to extend later. Here’s what I already know: – The only gateway in scope right now is Stripe. – I’ll be charging customers on a recurring basis (subscription payments). – Middleware-style, pipe-by-pipe processing is the pattern I want to stick with. Your job is to wire up a dedicated Pipeline class whose pipes take a user’s “Subscribe” request through validation, customer lookup/creation, plan resolution, coupon logic, creation of the Stripe subscription, and local persistence of the resulting data. I’m after idiomatic, PSR-4 compliant code with short, readable methods and solid unit tests. Please base the integration on Stripe’s latest PHP SDK (compatible with PHP 8), use Payment Intents where appropriate, and expose any webhooks needed for events such as invoice.paid, invoice.payment_failed, or customer.subscription.deleted. I’ll supply the API keys and set the endpoint URL; you can concentrate on Laravel and Stripe wiring. Deliver the code in a Git repo or pull request against my dev branch. The work is accepted when: 1. I can enter a test card, click “Subscribe,” and see an active subscription in Stripe. 2. The subscription details replicate to my database and display correctly in the UI. 3. `phpunit` runs with all new payment-related tests passing. If you see a cleaner approach that still leverages the Pipeline idea, feel free to propose it; I’m fine adjusting so long as the end result is a robust, maintainable Stripe subscription flow.