#User subscriptions are not synced with user subscriptions in Stripe
14 messages · Page 1 of 1 (latest)
I did read about above, but I manually canceled the subscription in Stripe for a test. So the subscription is actually no longer active.
I think I need to use a webhook.
But is there an alternative way instead of using Cashier webhook?
No
So a webook is the only solution?
Not sure what you're asking here..? The docs tell you how to cancel a subscription. If you do that outside of Cashier, how would it know a cancellation was triggered?
Ah. Makes a lot of sense.
So let's say I cancel my subscription and it end in 15 days from now. The subscription will at my database still be active. But will Cashier remember to set active status to cancel after 15 days?
Cause I am not using:
->cancelNow();
Did you read the part I linked..?
Yes. I read about the ends_atpart in my database. However, I am not sure, if Laravel is using this date and then updating the subscription status
Well yeah, the docs say it does. I'd assume when you call the cancel method it would call the Stripe API to cancel that subscription and update the database accordingly. But that's the thing, you're using a library to do that for you, so does it really matter how that library does it? Cashier includes methods to get the status of the subscription, use those instead of manually looking in the DB?
Ok, thank you.
When ends_at date have been passed Cashier do not retrieve the subscription as active anymore, and is not been listed anymore:
stripeCustomer
->subscriptions()
->active()
That is is really good.
However, the record is still been listed as: stripe_status active in the database.
Do I need to run somekind of a job and change the status of the subscription in database?
What? You keep changing things manually in the database..? As the docs say, if you cancel a subscription it is still valid. It's on the grace period then. I have no clue what you're doing or trying to do, but it sounds like you're doing weird things you're not supposed to do really.. read the docs.
I am not doing wired things. above code is not changing anything in database, it is just showing a list of customers active subscriptions
But I have 1 record which is still been listed as: stripe_status active in the database even ends_at have been passed.
Cashier knows it is not active, cause it is not been fetched users active subscriptions which is good.
Everything is working fine and I am using Cahier to basically handle everything.
stripeCustomer
->subscriptions()
->active()