Cashier/Stripe with multiple subscriptions
Hello hello, I'm brand new to Stripe and Cashier and could use a little help with understanding how I should structure things for my use case.
My client has a discord bot that can manage multiple discord servers for a user, for each server that user can subscribe to one of several paid plans. So for example a given user may have three discord servers, two on the basic $5 a month plan, and one on the pro $10 a month plan.
But each subscription is tied to a discord server, while the payment info and whatnot is tied to a user.
So I'm a little confused as the best way to set this up. On the stripe end I believe I just create a product for each subscription type, each with one price.
Then when I'm creating subscriptions in cashier using $user->newSubscription( $subscription, $plan ) I understand the second parameter corresponds to the product I've created in stripe, but what is the first parameter for in my use case? The examples I've seen all just assume something like "default" subscription. But I'm guessing that's not going to work in my case. If a user has multiple parallel subscriptions do these need to be unique to avoid one overwriting the other or something?
And since I want to tie each subscription to server where do I do that? Do I just include it in the metadata when a create the newSubscription: 'metadata' => ['server_id' => 'Some server id'].
If I add that metadata will I be able to test against that metadata later? Will the user be able to see it from their dashboard?
If anyone has a link to any tutorials/examples for a use case more like mine than the defaults I'm seeing that would be wonderful, otherwise any help or advice you could share would be much appreciated!
Please or to participate in this conversation.