scopic
scopic

Reputation: 1

laravel cashier not updating subscription name

I am using redirectToBillingPortal() in which the user can change the subscription plan, that works fine as it does change stripe_price but it does not change the name assigned, looking at the forums the name is not supposed to update; but then how are you supposed to distinguish between subscription tiers with e.g. subscribed('tier2') if the user changed their plan?

I can imagine a few ways, but would like to consider what the proper way to do this might be:

Both seem like it's definitely the wrong way of achieving this, but how else would I do this and retain subscribed('name') functionality to check pricing tiers?

I would also like to keep the external portal and avoid having to reinvent the subscription management stripe offers if possible.

Thanks!

Upvotes: 0

Views: 380

Answers (1)

jon
jon

Reputation: 123

To check the plan of a user just use subscribedToProduct method and use the product id of Stripe (eg 'prod_xxxxxxxxxxxx')

Upvotes: 0

Related Questions