#joshglazebrook

1 messages · Page 1 of 1 (latest)

lavish kilnBOT
glossy minnow
#

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?

dry imp
#

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

glossy minnow
#

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

dry imp
#

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