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

www's avatar
Level 1

Using Stripe / Laravel Cashier for checkout WITHOUT a $user

Hi,

Years ago I set up Stripe with Laravel and it was pretty straight forward - you would get a token and then store that token and use that and could update the card, etc. Now things are far more confusing and I'm lost trying to create a simple checkout.

What I'd like to do is set up a checkout that works when the person has not yet created an account - for example, I only want to have a $user object when the person is actually a customer.

But with Laravel Cashier, it seems that the default way is to add the Billable trait to user, and then use it like that.

Furthermore - Stripe wants you to create a Customer for a SetupIntent (for trials and subscriptions) - but again - the customer has not yet been created.

My goal is to have a checkout with a one-time charge - and then also a trial for a monthly subscription. Pretty basic stuff. And also be able to use their payment on file for other things they buy later.

Is the only way to accomplish this really to have the person sign up to an account and then do the checkout?

With software that is used for checkout, this type of checkout is very easy to create - but it lacks flexibility in terms of payment amounts and switching from one amount to another (for example if they upgrade) and also with cancelling/updating card info.

0 likes
0 replies

Please or to participate in this conversation.