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

microwaves's avatar

Laravel Cashier: each payment from the same user generating a different stripe_id

In my app I need to have a list of the invoices each User has. However, each time I make a new payment with Auth::user()->subscription('test')->create($token); a new stripe_id is being generated on Stripe's end and overwritten, and therefore whenever I try to list all my payments, I only get the last one (every single "stripe user id" is different even if I'm using the same account). How can I fix this? Thanks in advance.

0 likes
4 replies
LukePOLO's avatar

+1 ,

Having the exact same issue , the stripe_id should never change once they have subscribed!

[EDIT] I guess your always suppose to use the swap from then on out, currently it only supports 1 subscription

microwaves's avatar

How would you use it with swap? I'm pretty new to Cashier. I was already thinking about having a 1-n relationship to handle all my same-user-on-app-but-not-on-stripe payments ... Do you see an alternative for this?

jekinney's avatar

The stripe Id changes with each transaction. So if a user has 10 transactions you will have 10 stripe ids. The API doesn't care who (user id), just a transaction has taken place.

1 like
microwaves's avatar

So with the current state of Cashier, how can I at least retrieve "all the invoices from the current Auth::user()'s email"?

Please or to participate in this conversation.