Stripe Subscriptions
FilamentFlow makes it easy to create and manage subscriptions with Stripe. By updating the plans
key in the config/filament-flow.php
file, you can create subscription plans that will be available to your users.
Create Your Plans in Stripe
Log in to your Stripe account and create your plans. You can create as many plans as you like, but you will need to create at least one plan to get started.
Sync Stripe Plans and Products
Since Stripe already has a pretty intuitive interface for creating products and plans, FilamentFlow provides a one-click/command syncing with your existing Stripe products and plans. Just run flow:sync-with-stripe
to sync your products and plans with Stripe, or better yet, just click the button on the top-right of the "Products" page in the administration portal!
Ensure your Stripe Webhook is Configured
Ensure that your Stripe webhook is configured to point to the /webhook/stripe
route in your application. This route is automatically created by FilamentFlow and is used to handle Stripe events.
Automatic Configuration
In order to automatically configure your Stripe webhook, just run the following command:
php artisan cashier:webhook
Customized Configuration
From the products resource page, you can click the "Update Stripe Webhook" button and ensure that the URI shown is correct, then click "Update" to update your webhook in Stripe.