Hello, the flow I’m trying to implement is the following:
- ✅ user might or might not have downloaded and logged in on the app
- ✅ user visits my website and by following a stripe payment link they purchase a subscription through a stripe checkout session
- ✅ stripe sends the purchase to revenuecat through server to server notifications
- ✅ revenuecat creates an anonymous user with an anonymous user id
- ✅ user gets in the app, logs in with their email (same email as they used for stripe)
- ⚠️ what i’d want to do at this point: call loginUser with revenuecat, a user with the same email is found and they have a stripe subscription attached, in the app i get identified as that user and with access to the revenuecat offering.
i think there are two blockers i’m not finding a solution for:
- revenuecat is not setting the email field in the user metadata (of the anonymous user it creates) when it receives the server to server notification, this is somewhat necessary because it’s the only way i have to connect the user identity that purchased to the one that logs in the app
- i should login the user (for revenuecat) primarily based on the email, or just find a way to merge the two identities (the one created at stripe subscription time, and the one created at app user login time)
am i missing something? is it possible to do this through server 2 server notifications only? or do i need to implement some custom webhooks that make this connection?
i’d really love to do this as automated as possible, i hope there’s a way 🤞
thank you a lot in advance for your patience and help!