Skip to main content
Solved

In-App Non Renewable Purchase Webhook UserID Issue

  • 16 November 2021
  • 5 replies
  • 103 views

Ben
Forum|alt.badge.img+4
  • New Member
  • 2 replies

Hello,

 

When I purchase an in-app non renewable purchase, the Webhook will still trigger, with the old userID as an app_user_id. 

 

Details :


I’m having an issue when I switch accounts (userID) but use the same Apple ID (in Sandbox)(I don’t know in production).

 

I’m using of course, logOut then LogIn. And I verified that the new userID is well accepted by the SDK on iOS.

 

PS: I’m using alias (legacy) for the userID management, should I switch to transfer ? maybe it’s causing the issue ?

 

Thank you,

Using Xcode / Purchase SDK Cocoapods

Best answer by tina

Hey @Ben !

The app_user_id in webhooks should be the last seen app user ID of the subscriber. Since a customer can have multiple app user IDs associated with the same account, we recommend also taking a look at the aliases field for a list of all of your app user IDs. 

View original
Did this post help you find an answer to your question?

5 replies

tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • 338 replies
  • Answer
  • November 19, 2021

Hey @Ben !

The app_user_id in webhooks should be the last seen app user ID of the subscriber. Since a customer can have multiple app user IDs associated with the same account, we recommend also taking a look at the aliases field for a list of all of your app user IDs. 


Ben
Forum|alt.badge.img+4
  • Author
  • New Member
  • 2 replies
  • November 19, 2021

I switched to Transfer now, but I think, I should still give a look at the aliases .

I want to grant a specific account / userID with the non_renewal_purchase.

 

I need to find another way right ? and just reconfirm with the webhook data. Because, if a user switch from userID A to userID B, app_user_id will stay the same for few minutes / hours before switching to userID B.

 

I’m thinking of calling a function from the user device, before starting the purchase, or just when the purchase complete.

 

 


tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • 338 replies
  • November 19, 2021

Hey,

Some developers require customers to log in into an account and once that happens, they identify the customer with the app user ID. For reference: https://docs.revenuecat.com/docs/user-ids#provide-app-user-id-after-configuration 


Ben
Forum|alt.badge.img+4
  • Author
  • New Member
  • 2 replies
  • November 19, 2021

Yes thank you, but maybe it’s a bug or a delay or something,

because if I login with userA and userB (both linked with aliases), and buy with each user the webhook app_user_id will stay the same userA until few minutes / hours it might switch to userB.  

 

Example :

  1. Login with userID_A
  2. Buy in-app
  3. Webhook app_user_id userID_A
  4. LogOut userID_A
  5. Login with userID_B
  6. Buy in-app
  7. Webhook app_user_id still userID_A

 


Forum|alt.badge.img
  • New Member
  • 1 reply
  • November 20, 2021
tina wrote:

Hey,

Some developers require customers to log in into an account and once that happens, they identify the customer with the app user ID. For reference: https://docs.revenuecat.com/docs/user-ids#provide-app-user-id-after-configuration

 

Thanks for the refernce link. :thumbsup_tone5:


Did this post help you find an answer to your question?

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings