purchases-ios icon indicating copy to clipboard operation
purchases-ios copied to clipboard

CustomerInfo needs subscriptions.

Open c128128 opened this issue 9 months ago • 4 comments

Currently, CustomerInfo is returning [NonSubscriptionTransaction] for nonSubscriptions, which is good. However, for activeSubscriptions, it is returning Set<String>. Now, imagine a situation where a Customer has purchased from one app a product app1.product1 that has entitlement ent1, and from another app, a product app2.product1 that has the same entitlement. In my apps, I know that the user has ent1, but I can't get all the products that were bought (I am in this situation because of a wrong implementation in previous versions of my app).

Currently, there are no options to get the Subscription array; you can get only the productIdentifiers. But with productIdentifiers, you can't get the PeriodType, and more than this, nonSubscription currently is mapped to NonSubscriptionTransaction, but Subscription is not, and it looks like an unfinished idea.

c128128 avatar May 09 '24 16:05 c128128

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar May 09 '24 16:05 RCGitBot

Hey @c128128 ,

This is returned like this because users can have multiple subscriptions at once and in these subscriptions it is more the expiration time and purchase time associated with the entitlement that will give you information on the exact subscription. This instance property is used more to track the identifiers of current subscriptions, but if you want more info on the subscription itself you will likely need to set up webhooks or look into the entitlement object.

You can also use our API endpoint here which should have this information in the subscriptions object.

  • https://www.revenuecat.com/docs/api-v1#tag/customers/operation/subscribers

Let me know if that helps!

michaelAtRC avatar May 13 '24 16:05 michaelAtRC

Hey @michaelAtRC,

You already have all this information inside the client SDK, just that info is not public.

c128128 avatar May 13 '24 16:05 c128128

More than this, you can get that data from rawData that is public.

c128128 avatar May 13 '24 16:05 c128128

Hey @c128128, Sorry for the delay on this - I'll add this request to our internal feedback tracker. Hopefully it's something we can support going forward. Appreciate you taking the time to reach out!

kmurphy-rc avatar Jun 14 '24 21:06 kmurphy-rc

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.

github-actions[bot] avatar Jun 23 '24 00:06 github-actions[bot]