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

Daniel-Pablo's avatar

Help updating subscription status with cashier

Hi, community, need some help on this, my brain is going to explode!

I am making subscriptions with Laravel Cashier, and all works great already working BUT here is the issue

ray($user->subscription('default'));

// output from this
array:11 [▼
  "id" => 1
  "user_id" => 1
  "name" => "default"
  "stripe_id" => "sub_1Lktj8CBX"
  "stripe_status" => "active"
// more info...
]

as you can see I got from my database the following "stripe_status" => "active" BUT the subscription was CANCELED from the STRIPE WEB PAGE PORTAL so in stripe the subscription is canceled but in my database is not been canceled, still active

now what I want is to PULL the data from the stripe and REFRESH the subscription, that way I can know if the subscription is still ACTIVE or was canceled, BUT HOW? I try to find any FUNCTION that does that, but I got no luck on that I am trying to do something like this $user->subscription('default')->updateFromStripe() and that updates my user subscription with the new data if the data was changed... hope make sense

https://laravel.com/docs/9.x/billing#checking-subscription-status

in fact, my user goes to the stripe portal and he makes the cancel itself so how to handle that? https://laravel.com/docs/9.x/billing#billing-portal

Thanks a lot

0 likes
3 replies

Please or to participate in this conversation.