#joshglazebrook
1 messages · Page 1 of 1 (latest)
another instance is where I was planning on listening to the subscription.updated event to update my database when a upgrade/downgrade happens. But if I can't rely on the order of the events, then I would essentially have to turn all subscription events into essentially a "sync" event. fetch the current status of the sub from stripe, ignore all the event data, and then update the copy in my db?
When you make the API request to create a Subscription, your system should be able to create an entry in your database based on the response
For other subscription changes, your system may make an additional Retrieval request to check the latest changes on Subscription
Hmm okay. Should I do the same for upgrades/downgrades? I was relying on the prevAttributes of the event to see if the "plan" or "price" had updated
For upgrade/downgrade, the event will only be sent when your system initialises a request to change the price. You should be able to rely on the previous attributes in the event