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

chrisgrim's avatar

Laravel Cashier confusion

Hi All, I was hoping someone could point me to a good Laravel cashier tutorial. I tried following the Docs and a few other tutorials online but I am getting pretty confused. I (incorrectly I think) assumed that Laravel subscription_types aligned with each product in my stripe account. So if I have a normal plan and a premium plan I should have a Normal Plan and Premium Plan subscription type and in stripe make two products named Normal Plan and Premium Plan. However, looking into the Laravel documentation it looks like when I switch plans

$user->subscription('Normal Plan')->swap('provider-plan-id');

it doesn't actually switch the plan name, it just changes the stripe_id plan. So even though in stripe I see the premium plan being charged, Laravel still shows the name of the subscription as Normal Plan. I'm guessing that means I am looking at the laravel subscription name incorrectly, but I am finding it very confusing.

Is there a tutorial that explains the subscriptions like I am 5?

0 likes
6 replies
tomasosho's avatar

are you sure your plan value is not gotten from your local database rather than stripe?

martinbean's avatar

@chrisgrim I don’t really follow. The stripe_plan column is the column that holds the current plan the user is subscribed to. Why would updating the plan update a subscription name? Subscription name is just a label.

chrisgrim's avatar

@martinbean I think this is my issue. I am getting confused by the subscription name being just a label. I would assume that a premium and normal would be two different subscriptions. However it seems that it should just be a 'default' subscription and then the plan is just based on the stripe_plan?

martinbean's avatar
Level 80

@chrisgrim If customers subscribe to use your application (but can pick from one of many plans, i.e. standard and premium) then yeah, leave the subscription name as “default” or something. The stripe_plan column determines what plan a customer is subscribed to, and how much and how often they will be charged.

If customers can subscribe for a variety of reasons, then that’s when you might want to use different names. For example, in my SaaS CMS (think Squarespace), the default name for subscriptions is “website” and there are two plans: a monthly plan and a yearly plan. However, users can also have subscriptions for other things such as mailboxes and domain names if I’ve registered one on their behalf. So for mailboxes, I‘ll have a subscription with the name email, the stripe_plan set to the plan I use for mailboxes, and the quantity set to the number of mailboxes the customer actually has. So I can pricing similar to G Suite where I charge X dollars per mailbox per month.

Same with domain names. I can have a subscription called domain with the stripe_plan column set to the Stripe plan I use for domains.

This is obviously a more complicated set-up than your traditional, “I have a SaaS, I want to charge a subscription for it”, but hopefully clears up the difference and the intended usage of both the subscription name column the stripe_plan column.

chrisgrim's avatar

@martinbean Oh man. This clears the confusion up so much. Thank you for taking the time to explain it!!

1 like

Please or to participate in this conversation.