Using Stripe & Cashier for companies instead of users
I have a use case where a "company admin" registers and sets in a profile authorized users within his company to access the site. I want to offer a trial as well as Free, Monthly and Annual Billing levels of the service and need each authorized user of that company constrained by the "master".
I have explored Stripe and Cashier but all appears to be ingrained into using the users table and I can't see a work around for my use case.
I would appreciate any and all suggestions ... I am certainly willing to do the research needed but I don't see a solution that I can explore.
In the setup for Cashier in Laravel 5.*, did you try applying the migration and config to an account/company table? Then any user associated with the account could access resources based on the subscription.
Something like this for 5.2. Please modify if you are using a previous version:
@desloc I'm having some trouble with your suggestion. When I try $account->subscribed() it comes back with a SQL error because it checks for subscriptions.user_id instead of subscriptions.account_id. Any thoughts on how to fix that?
I don't know if you found your solution to this or not, but for future reference, to fix that error, simply change the model Stripe is linked to in app\config\services.php: