using multi tenancy database setup with laravel cashier subscriptions with stripe #486
Replies: 2 comments 4 replies
-
I need this too. Did you ever make any headway here? |
Beta Was this translation helpful? Give feedback.
-
I think there is another way rather than creating a new stripe account for each database. You will still need a one to one relationship but the table will be for STRIPE_WEBHOOK_SECRET key. in the stripe dashboard -> webhooks you can create multiple webhook endpoints, each endpoint can represent a separate url for the sub domain. Once you create a webhook you will then need to retreive the secret (each endpoint will have its own secret) Next you will then need to create a custom task which will essentially just overwrite config value which i have setup in my system as cashier.webhook.secret which references the environment variable STRIPE_WEBHOOK_SECRET |
Beta Was this translation helpful? Give feedback.
-
Has anybody implemented laravel cashier subscriptions with stripe webhooks for a multi tenancy environment.
One method is to create a separate stripe account for each sub domain, but then you would need to add default products/subscriptions upon creating a new tenant and store/use tenant config which you can easily extend the current config().
Another method I have thought about was to use the same account for all sub domains. you would need to
Beta Was this translation helpful? Give feedback.
All reactions