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

ORStudios's avatar

Cashier Returning True For Canceled Subscription Using subscribed()

Hi

I am using Cashier combined with Stripe CLI.

I create the user and then subscribe to the subscription, I then cancel it using the "immediate" option via the Stripe Dashboard and a response is sent to my local project. At this point my database is successfully updated to show canceled against the user.

My problem comes when I try to check to make sure the user has a valid subscription. I use subscribed() in a middleware to check but it always returns true even when showing cancelled in the database.

For example I ran a test

var_dump($user->subscribed($this->subscription_name)); echo "--"; var_dump($user->subscription($this->subscription_name)->canceled()); echo "--"; var_dump($user->subscription($this->subscription_name)->onGracePeriod()); echo "--"; var_dump($user->subscription($this->subscription_name)->ended()); exit; ​

And for the user the previous returned

bool(true) --bool(true) --bool(false) --bool(true) ​

Does subscribed() actually check if the subscription is active?

0 likes
0 replies

Please or to participate in this conversation.