Cashier with multi-plan service
Laravel Cashier seems to be oriented around single-user-single-plan systems (which is nice for Laracasts for instance).
Is there any way to make Laravel Cashier support multi-plan systems? This means a single user is a single Stripe customer, but may have multiple Stripe plans active at the same time. The idea is to allow a single user to create multiple application instances (which are determined with plans) using single credentials.
Would the following work:
- Split the Cashier migration between
usersand something likeapplications(application instances table). - Set the
Applicationmodel to implementLaravel\Cashier\Contracts\Billableand implement the interface to fetch some Cashier data from theApplicationmodel and some of the Cashier data from theUsermodel. - Use the
Billabletrait on theApplicationmodel, which in turn uses the customBillableimplementation.
Are the Cashier migration stripe_id and last_four columns the only "per-user" type column? stripe_subscription is the customer<->plan reference ID for the stripe_plan I presume?
I tried looking for definite info on the problem, but didn't find any.
EDIT:
How would Cashier handle multiplan invoicing? Is it possible to lump all subscriptions of a user into single invoice or will the user get 2+ different invoices for each plan they get if the above method is used?
Please or to participate in this conversation.