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

Hussam3bd's avatar

Help me understand what does the subscription name do in Laravel Cashier

Hi there, I am just a bit confused about the usage of the subscription name and WHEN I should use it.

I have this scenario when I have 3 subscriptions plans 1- Freelance 2- Company 3- Organization

and I have for those 3 plans"monthly and yearly" subscription, and in my Stripe account, I have 6 plans "freelance-monthly, freelance-yearly, ...etc"

now my subscription name should be "Freelance or Company"? or should be "default"? and I can check for the current plan the user is in?

I am just a bit confused, what is the case to handle this kind of situation?

0 likes
6 replies
Aridez's avatar

Stumbled upong here AFTER looking the documentation. Unless I'm missing something, the only think the docs say is:

The first argument passed to the newSubscription method should be the name of the subscription. If your application only offers a single subscription, you might call this default or primary.

And left me with the same doubt. Should I treat it as two different subscriptions or should I treat it like one subscription with different intervals?

Aridez's avatar
Aridez
Best Answer
Level 2

Just to answer this question for anyone wondering too:

The name is used to implement access control, that means that

  • If the monthly and yearly subscriptions have exactly the same access then the name should be the same.

  • If you had some kind of "pro" subscription that gave the users access to more parts of the product then you should use different names and use them in the middleware to block access accordingly

4 likes
kreierson's avatar

@Aridez Someone should create a pull request for the Laravel docs and add this in (maybe I will). This was very helpful. Thanks!

1 like
Radiergummi's avatar

Thank you. Why can't this be stated in the documentation? I like Laravel, but sometimes this "it works, stop asking questions and pass strings, dummy" approach gets on my nerves.

3 likes
akoper's avatar

Having people subscribe to your, say, SaaS, is very valuable and important. Stripe is from its origins an online payment processor. Stripe is complicated. Therefore Cashier is complicated. The documentation for both isn't written well and is confusing. It's a pretty big, hard job. @taylorotwell @jeffreyway

Please or to participate in this conversation.