FilamentF
Filament3y ago
Pede

Multi-Tenancy with Laravel Spark

What I am trying to do:
Im trying to add laravel spark on top of multi-tenancy teams.

What I did so far:
Installed laravel spark and followed this guide: https://spark.laravel.com/docs/spark-stripe/cookbook.html#team-billing
and installed the "filament/spark-billing-provider"
->tenantBillingProvider(new SparkBillingProvider());

to my panel.

What is the issue:
My Multi-Tenancy (team selector) now has the "Manage Subscription" option an it links to: http://127.0.0.1:8000/app/billing/team/2
It opens the spark billing portal correctly and shows "Managing billing for Test Team." so it seems to work correctly.
However when I get redirected back from the stripe payment it lands on url: http://127.0.0.1:8000/app/billing?checkout=subscription_started
Which resulted in 404 error. If I manualy add "/team/2" to the url everything works as expected.
http://127.0.0.1:8000/app/billing/team/2?checkout=subscription_started

So my question is: How can I manipulate the url from the stripe success redirect?
A perfect starting point for your next great idea.
Solution
Redirect is fixed in Spark release v4.2.11. Thank you @Nathan for reaching out to the Laravel Spark team.
Was this page helpful?