In- App Non Renewal Purchase original_app_user_id

  • 23 November 2021
  • 0 replies

Badge +3
  • New Member
  • 2 replies


I’m trying to grant users by writing to their userID, with a Webhook.


When the Webhook triggers, and I get the original_app_user_id I search which user with this original_app_user_id  is requesting a purchase, so I’m sure it’s this userID. ( see attached the code to query )


I update the original_app_user_id to the db right before I make a purchase from the iOS SDK by requesting purchaseInfo.


Does it seems to be a good way to do it ? or I could face bad scenarios ? If a change might happens to the original_app_user_id will it be before, during or after the purchase ?


PS: I’m using Transfer now (and before I used Aliases)


Thank you,


  async function returnCurrentUid(original_app_user_id){

const querySnapShot = await fb.collection('in_app')
.where('original_app_user_id', '==', original_app_user_id)
.orderBy('request_date', 'desc')

if (querySnapShot.empty) {
return 'Unknown'

const uid =[0].id;

return uid;


0 replies

Be the first to reply!