#cabeedelhertz
1 messages · Page 1 of 1 (latest)
Why does your frontend need to make a call to your backend to check subscription status at that point? When you call confirmPayment, the promise should resolve and you should know whether or not the payment was a success
But we provision access to the new premium features via the BE. So at some point the FE needs to fetch the new subscription + refresh the user's token in order to get their new feature access. So the FE might be trying to fetch the updated subscription + feature access while the BE is still being updated
Yeah, but generally those events are sent to your webhook endpoint ~instantly
So it would only be a few seconds where you wouldn't have the data updated
You could have some loading screen or splash screen in the interim
So do most businesses just rely on eventual consistency when it comes to this. I would think that something like a payment and in session fulfillment would be something you would want with guaranteed immediate consistency.
Do most businesses just live with this race condition?