Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jwhm's avatar
Level 1

Using Laravel Cashier with Multiple Subscriptions

My employer has asked that a User has multiple Subscriptions, and each Subscription relates to a Server Model, which contains a Unique Server ID, and other generated information.

So a User might have 2 servers:

Server 1 - Title, Username, etc -> Linked to Subscription
Server 2 - Title, Username, etc -> Linked to Subscription

So in total, that User would have two subscriptions, linked to two servers.

In this particular case, the User would be paying for both Subscriptions for Each Server.

As it's 1 Subscription to 1 Server, and a User can have many Servers.

Any recommendations on how to organize this with Cashier/Stripe?

Or would it be better to attach Server ID to Stripe Meta?

'metadata' => [
    'server_id' => 'Some server id'
]

Or do I apply the billable trait to the Server model? In which case will I still be able to create one billing portal for a user to manage all of their subscriptions?

In addition, how would the creation of Servers to Subscriptions work?

auth()->user()->server()->create(title, username, etc)->->newSubscription()->checkout?
0 likes
0 replies

Please or to participate in this conversation.