I am using Firebase Cloud Functions to handle Stripe webhooks. I let new app users create a payment method with Stripe. When they click on add card, stripe calls a webhook URL, which is a Firebase Cloud Function. That function searches for the app user from Firestore, gets the name, creates a new Stripe Customer with the user name, and updates the user in firebase with the stripe account ID.
Simple and it works.
But now, how do I update my Expo app State with the new stripe customer ID? Is there a way to update the app from the cloud function somehow?
If you're thinking "why don't you just call your firestore from the app when the success URL is reached?" then it's a problem, because I cannot know for sure that by the time I am on the success redirect URL, my cloud function finished doing what it's supposed to do.
Should I create a dynamic link for this? is there another way? Suggestions?