RevenueCat

Build With RevenueCat

Build a customized mobile subscription business with RevenueCat. We do the heavy lifting of normalizing subscribers from any source and maintain a single source of truth for subscription status, so you can get back to building your app.

RevenueCat is a powerful, secure, reliable, and free to use in-app purchase server with global support. All you need to get started is an API key.

Ask A Question

Questions

5

Get Trial info when calling getEntitlements (react native)

Hi, Where do I get the details about the trial period of a product? In the debug logs I see the details: sub_base_year_7dt_0dis_4499 - SkuDetails: {"skuDetailsToken":"AEuhp4KzyAa_7DAhCzFKHEQ8IF-QpG78EOeeLPk0svSArQOHVWcIETZINK77vgg0vu_x","productId":"sub_base_year_7dt_0dis_4499","type":"subs","price":"₪149.90","price_amount_micros":149900000,"price_currency_code":"ILS","subscriptionPeriod":"P1Y","freeTrialPeriod":"P1W","title":"1 Year Premium Membership (STG - Dynamo Parents)","description":"Give your kid 1 year of fun education"} When calling getEntitlements, I am getting the following response (in Android): ... "annual_with_trial": { "currency_code": "ILS", "intro_price_string": "", "intro_price_cycles": "", "intro_price_period_number_of_units": "", "price_string": "₪149.90", "intro_price_period": "", "intro_price": "", "price": 149.9, "title": "1 Year Premium Membership (STG - Dynamo Parents)", "intro_price_period_unit": "", "description": "Give your kid 1 year of fun education", "identifier": "sub_base_year_7dt_0dis_4499" }, What am I missing? btw, in iOS (I know its a different product as its from the app store, and still, response in React native) I am getting more info: “annual_with_trial”: { “description”: “Give your kid 1 year of fun education”, “price_string”: “₪159.90”, “intro_price_period_unit”: “WEEK”, “currency_code”: “ILS”, “title”: “1 Year Premium Membership”, “price”: 159.89999389648438, “intro_price”: 0, “identifier”: “sub_base_year_7dt_0dis_4499”, “intro_price_period_number_of_units”: 1, “intro_price_period”: “P1Y”, “intro_price_string”: “₪0.00", “intro_price_cycles”: 1 }, Thx

Posted by orr kowarsky 3 months ago

0

Legacy in app purchases and users without accounts.

Hi! I am using RevenueCat in the Android beta version of my app with great success. Thank you for such a great product! For the Android app it was super easy since it had accounts and subscriptions from the start. Now it is time to add RevenueCat to iOS too and here it is a little more complicated since it started as a paid app, then was a free app with a one time in app purchase and now moving to subscriptions. I have the following rules for the purchase 1: IOS users that purchased the app when it was a paid app should remain unlocked on iOS by checking the originalpurchase version 2: IOS users that purchased the one time in app purchase should stay unlocked on iOS, and get a special offer if the switch to Android 3: Subscribers should be able to access premium featrues on both platforms if they are signed in If a user is not signed in the user is asigned an anonymous id. I use firebase authentication and followed your example with the auth state listener and resetting purchases when signing out. The problem I have is that it also removes the originalpurchase version from purchaser info, so if a user that has purchased the iOS or unlocked the one time in app purchase uses an account and then signs out, it will loose the in app purchases. As I see it there are two possible solutions. 1: If the singed in user had premium access, restore purchases after sign out is completed. 2: Keep the legacy in app receipt validation and use that to validate the paid/one time fees. Which one would you recommend? I'd love to go with 1 since it removes the need for having multiple restore variants. Are there any downsides I should be aware of?

Posted by Simon 4 months ago

3
ANSWERED

[Android] How to accurately know the current active subscriptions.

Hello. I am having a hard time figuring out what are the active subscriptions owned by the user after he/she has cancelled the subscription from Play Store. On app start, I get the active subscriptions in the callback to `Purchases.sharedInstance.getPurchseInfo(callback)` using `purchaseInfo.activeSubscriptions` Here are two scenarios where I am unsure if the received active subscriptions data is correct or not. Scenario 1: 1. I subscribe to a subscription 'X' which renews every month. (a test subscription renews every 5 minutes) 2. I immediately cancel the subscription from Play Store. 3. After 5 minutes the subscription expires. And is not visible on Play Store subscription tab anymore. But I still keep getting the cancelled subscription as an active subscription on my app start for a few minutes even after it has expired in the play store. Expected: The subscription shouldn't be active on the app once it is expired on the Play Store. Scenario 2: 1. I subscribe to a subscription 'X' which renews every month. (a test subscription renews every 5 minutes) 2. I immediately cancel the subscription from Play Store and do a fresh install of my app. 4. It's still not been 5 minutes and the subscription on Play Store has still not expired. But I do not see this active subscription on the app. Expected: The subscription should be active on the app since it has not expired yet on the Play Store. Android RevenueCat SDK version: 2.1.2

Posted by Jayesh Solanki 5 months ago