Solved

In-App Non Renewable Purchase Webhook UserID Issue

  • 16 November 2021
  • 5 replies
  • 86 views

Badge +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

icon

Best answer by tina 19 November 2021, 19:58

View original

5 replies

Userlevel 5
Badge +10

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. 

Badge +4

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.

 

 

Userlevel 5
Badge +10

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 

Badge +4

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

 

Badge

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:

Reply