#thebestmoshe

1 messages · Page 1 of 1 (latest)

vital trailBOT
craggy bobcat
#

Hello

#

No there shouldn't really be "data staleness" in this regard.

#

Can you provide an example Subscription that you have tested with and seen this?

broken cedar
#

It's slightly more complex, and I'm unsure exactly which subscription had the issue.

Basically, I have two subscriptions I need to keep in sync. An annual and monthly. If a user creates one, I auto-create the other. If the user cancels one, I auto-cancel the other.

I have a customer who canceled one (monthly), my system auto canceled the other (annual).

However, my system then recreated both subscriptions.

This issue almost never happens, however, occasionally I have issues like this, that seem to be some kind of race condition.

I'm trying to rule out the possibility of getting stale data from Stripe.

craggy bobcat
#

Otherwise, this sounds completely dependent on your code. If you retrieve the object then the data will not be stale.

#

So a "safe" way to proceed would be to retrieve the object when you receive the Webhook to check its current state, instead of relying on the Webhook's data directly.

broken cedar
#

Possibly related to webhooks coming out of order. I'm still trying to think through the timing of all the events.

#

Thanks for confirming my data staleness question 🙏

craggy bobcat
#

Sure thing