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

Blindacme's avatar

Best approach for plan 'name' for cashier/stripe

I have built cashier in my application and I am stumped to the best approach for plan names. My set up has been to use the stripe plan name as the "name" so for example in my database under subscriptions I have "name" is middle_tier_annual_per_user and "stripe plan" is middle_tier_annual_per_user.

The problem is that if the user upgrades or downgrades their plan then the name never changes but the plan does. So for example downgrading from "middle_tier_annual_per_user" to "top_tier_annual_per_user" results in my table row using name as "middle_tier_annual_per_user" and the "stripe plan" changes to top_tier_annual_per_user.

I hope that makes sense. Just wondering what everyone elses approach has been to this? Is it as simple as passing in the new plan "name" when upgrading/downgrading, for example:

$company->subscription($currentPlan)->swap('new name', 'stripe_plan_name');
0 likes
0 replies

Please or to participate in this conversation.