ionic capacitor
Hello, I am having a peculiar issue. First of, I do configure revenue cat right of the bat with user guid as appUserId
Purchases.configure({
apiKey: revenueCatApiKey,
appUserID: userStore.tokenData.user_guid,
observerMode: false,
})
then, before even finishing the purchase I do all the sync verification stuff to make sure the user guis is being used
async purchasePackage() {
const success = await this.syncRevenueCatUserId()
if (!success) {
this.status = revenueCatStates.FAILURE
return
}
const response = await this.orderStore.purchaseOffering()
this.status = response.state
if (this.stateHalfSuccessful) await this.checkIfBackendSynced(response.paymentId)
},
async syncRevenueCatUserId() {
// Attach email as a subscriber attribute
if (this.user.email) {
await Purchases.setEmail({ email: this.user.email })
console.log("Email set in RevenueCat:", this.user.email) // Log email
}
const { appUserID } = await Purchases.getAppUserID()
console.log("Post-login User ID:", appUserID) // Double-check immediately
if (appUserID === this.user.guid) return true
},
as you can see, I do verify whether appUserID equals user.guid and ONLY in that scenario I procede … so all these checks do pass and yet, I have received 3 cases of revenue cat sending me a completely anonymous webhook with not only anonymous ID but no email what so ever… one client was kind enough to provide feedback
Would you say you have a fast internet connection? - yes
In which part did you buy Premium? Right after the tutorial? Elsewhere? - only after I looked at the application
Regarding payment, did you add a new card? Or did you just use the classic Play Store account, as always - I was choosing from cards on Play Store and after confirming in Air Bank, a message popped up saying that the card could not be added (I managed to do it the second time, but it did not pair with the application at that moment)
I assume the card shuffle was the cause? but why? why does that wipe my attempts to set the ID? Or am I doing it wrong?
Last but not least, in 2/3 cases I immediatelly after received a transfer event that wanted to transfer to the correct user guid and also had that email attribute … whyyyyy why can’t that just be in the initial purchase?? why a transfer event?? especially if I am logging them in straight at configure
Please help, I am literally in production with this error not able to fix it