Question

iOS SDK - Transferring Purchases and Keeping Subscriptions

  • 24 October 2023
  • 3 replies
  • 28 views

Badge

Apologies in advance, this topic is slightly confusing to me. I’ll explain my scenario and what I would expect. This is all in the Sand Box at the moment. Not sure if that makes a difference. 

When a User A signs up and subscribes, they get 20 credits a month on my app (reloaded at renewal) for X dollars/mo.

If a User A signs out, and then User B signs up and subscribes, I want User A to keep their subscription active on the device, and User B as well. 

When I try “Keep with original App User ID”, I get an error with User B subscribing. I would expect that this new userID is separate from User A’s. But I get the error: “There is already another active subscriber using the same receipt.”

I don’t want to transfer the subscription because I want User A and User B to have to purchase. 

 

 


3 replies

Userlevel 3
Badge +8

Hi,

Happy to help here. It’s important to note here that the receipt is stored on the device, and is not specific to the RevenueCat app_user_id.

You could use the Keep with original app id setting to restrict the purchase to the app_user_id. If you do this, I’d recommend not generating any anonymous ids.

Badge

Hey Ryan, Thanks for the reply. I’m using firebase userIDs with the extension integration, and so any anonymous IDs created by firebase are converted to email/password accounts before purchasing is allowed. And I’m logging them in at app launch. 

But regardless, I think the route of Transfer to new App User ID is best. It’ll be so rare that someone logs out and in with a new account, and keeping the subscription tied to the device makes sense after looking at my situation. 

What I’ve done is listen for the TRANSFER event on the backend, and then I swap credits to that transferred_to user. 

Badge

Hey Ryan, I have some non-consumable purchases in the form of entitlements (pack 1, and pack 2). I have firebase integration and what I’m seeing in my customers db is that when a non-consumable purchase is made, I see the entitlement in both userIDs. User A has made a purchase for pack 1, and User B made a purchase for pack 2. Both customers show both entitlements. Is this expected? 

 

Reply