Question

How to check the subscribed appUserId when attempting to transfer?

  • 3 April 2024
  • 3 replies
  • 62 views

Badge

hi, I have a question about restoring a purchase.

We don't want the B account to be able to subscribe to the service if the A account is subscribed to it.

So we set the Transfer setting to 'Transfer if there are no active subscriptions'.

 

Then, when I tried to subscribe to account B in RevenueCat, it threw a 'RECEIPT_ALREADY_IN_USE' error and prevented the payment from going through. Very nice.

The problem is that this error code response has no clue as to which account is subscribing (e.g., Account A).
From a user perspective, it would be nice to see a message that says "You are subscribed to account A and cannot subscribe" rather than just "You are subscribed to another account and cannot subscribe", but I couldn't find a way to do this.

 

Is there anything in RevenueCat that would allow me to do this?


This post has been closed for comments

3 replies

Userlevel 4
Badge +6

Hey @sehee-4e3acf !

 

This is because the store account on the device has a subscription, so a subscription is already seen for this store account that is already linked with another app user ID. You will need this device to have another store account logged in in order to do what you are trying to do. The limitation here is that the stores wont allow users to have multiple of the same subscriptions so we are seeing that a subscription is already there on the store account despite there being a different app user ID. 

 

Let me know if that helps! 

Badge

Thanks for the answer!
However, my problem is that I can't deduce the other app user IDs you mentioned when I get the 'RECEIPT_ALREADY_IN_USE' error.
Neither 'Restore Purchase' nor 'Sync Purchase' you linked to work with the 'Transfer if there are no active subscriptions' setting.
How do you know which app user ID is subscribed?
The 'RECEIPT_ALREADY_IN_USE' response doesn't give me any clues like transactionId, originalAppUserId, originalTransactionId, etc.

Userlevel 4
Badge +6

Hey @sehee-4e3acf ,

 

Unfortunately, we don't have the ability to surface that information in the RECEIPT_ALREADY_IN_USE error. You could create a custom implementation on your end that reacts to this error to track the app user id that is currently logged in. If you're finding that this issue is cropping up a lot with users, it might be worth considering the restore behavior "Transfer to new App User ID", which will allow the transfer of the receipt to the new app user id even when there is an active subscription.