#krebedev
1 messages · Page 1 of 1 (latest)
Hi, let me help you with this.
What do you mean by "accounts", exactly?
Why were they reactivated?
Thank you, @unkempt moss .
By "accounts" , I meant subscriptions. My bad.
So, we recently updated our pricing plans. We needed to update existing subscribers' subscriptions in Stripe accordingly.
But why were the cancelled Subscriptions reactivated?
We didn't know they were cancelled. Obviously we had incomplete data in our DB
In our DB, we selected all "active" subscriptions and updated those in Stripe. But the problem is, some of these 'active" subscriptions were alraedy cancelled
You have this data in Stripe, so there's no need to duplicate it in your database.
One idea, except going though Subscriptions manually, is fetch all customer.subscription.updated events that happened during the update: https://stripe.com/docs/api/events/types#event_types-customer.subscription.updated
And checking for data.previousAttribute.status to be cancelled: https://stripe.com/docs/api/events/object#event_object-data-previous_attributes
Happy to help.