Get help with your SDK implementation.
Recently active
Suppose you don’t have any user registration or account system.Now, if the user downloads your app (let’s say with 1 week free trial), and deletes the app, and re-downloads it again, if they are using random/anonymous user IDs that are generated by RevenueCat, then they will be able to circumvent the subscription process by simply deleting and resinstalling the app to get another 1 week free. They can do this repeatedly. Am I correct?If so, then it seems important to use custom user IDs in this scenario (for example, UIDevice.currentDevice.identifierForVendor.UUIDString) which will generate a unique user ID for each device for the vendor/app. Then we can check if the user has already downloaded and installed the app and taken advantage of the free trial, and if so, don’t allow another. Correct?If we use this approach, the subscription won’t be available on any other devices. But that’s okay, since on those devices, we can always use the “Restore Purchases” button to get access to thos
Hi all,I am trying to integrate RevenueCat into my Managed Expo app to allow users to make a subscription purchase. I’ve followed all the guides on setting up my subscriptions in the Apple appstoreconnect as well as on RevenueCat’s dashboard.Now I am trying to `Purchases.getOfferings()`, but it is returning ERROR: [Error: There is an issue with your configuration. Check the underlying error for more details. There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). For context, my organization uses a separate internal distribution build for development.In the app store, our bundleIdentifier follows standard naming convention: `com.myorg.myapp.ios`. For our internal distribution development build, our bundleIdentifier is `com.myorg.myappdev.ios`.After reading this post, my hunch is that my development bundleIdentifier does not match the one in t
EXPIRATION event type with "expiration_reason"="UNSUBSCRIBE" is sent right after CANCELATION and isn’t sent when subscriptions are really expired according to expiration time.(Google Play subscriptions)It was ok before the release for Google Play billing V5...
The problem is that purchasePackage takes long time (over 60 sec) to complete its job and return value. Developed with Flutter, testing on iOS device with Sandbox environment. The related code is :CustomerInfo purchaserInfo = await Purchases.purchasePackage(selectedPackage); Is this something related to Sandbox and App Store Connect and no need to worry on production environment? If anyone advise on this issue, ,much appreciated. Thanks.
Hi there,My question is this: We have connected webhook events to our app and in the client side we have implemented only the configure part with userId and login method RNPurchase.configure({ apiKey: "xxxxxxxxx", appUserID: UUID-userIdHere }); RNPurchase.logIn(userID); So our app won't have anonymous users. According to documents, we should not call logOut() method for users because we don’t want anonymous users. However, we should be able to get TRANSFER type of events in the webhooks but we could not received it yet. In this case our users can change users with different logins. We have tried that: 1-) User logged in our application, sdk configure and login method is invoked.2-) Then we have deleted user in our system 3-) We have created new user with different userId but belongs to same Google Play user. 4-) SDK initialized configure and login method again but never received TRANSFER event. We get all events except TRANSFER events. So how can we g
I have in Revenue 1 Offer with 4 packages. 1 Premium Monthly, 1 Premium Yearly, 1 Plus Monthly, 1 Plus Yearly. All packages are connected with the product from the respective app stores. Everything works perfectly on Apple but Google does not show me a single subscription (Premium Monthly). Does it take until changes are visible in RevenueCat. We use the whole thing in a Flutter App.
I’m trying to use an offering with multiple packages (using custom identifiers), and the documentation is incorrect when it says you can access an offering and a package via its identifier in this section:https://www.revenuecat.com/docs/displaying-products#displaying-packages It says to use this code:offerings.all("experiment_group").package("<package_id>")But in the RevenueCat SDK, “all” is a property and not a method. See PurchasesOfferings interface:https://revenuecat.github.io/react-native-purchases-docs/5.13.1/interfaces/PurchasesOfferings.html#current Similarly, there is no “package” function on the PurchasesOffering interface:https://revenuecat.github.io/react-native-purchases-docs/5.13.1/interfaces/PurchasesOffering.htmlIt seems like the only way to get this is to search through the availablePackages array until you find a matching identifier.
Consider a situation where user had subscribed to any of the plans in one platform (assume ios) and later due to some reason user has to change to different platform (say android) or vice versa. How to best handle this situation ? User doesn’t seem to see active entitlement.
verbatim copy of code from the documentation: const sdk = require('api')('@revenuecat/v4.0#1yz2c0m2sl5v5md8q');sdk.auth('Bearer REVENUECAT_API_KEY');sdk.deleteSubscriber({app_user_id: 'app_user_id'}) .then(res => console.log(res)) .catch(err => console.error(err));produces this error:Error: Sorry, `deleteSubscriber` does not appear to be a valid operation on this API. at Proxy.<anonymous> (/workspace/node_modules/api/src/index.js:164:21) at processTicksAndRejections (node:internal/process/task_queues:96:5)
After i do purchasing using function : final result = await Purchases.purchaseProduct( "skuID", type: PurchaseType.inapp,);after successing do payment, revenueCat will trigger webhook and retrieve data just like : https://www.revenuecat.com/docs/webhooks#events-format what if i want to adding new key-value such as meta-data into webhook responsejust like : {key1: value1. . .meta-data: { recipe_id: id_recipe_1 }}do you have any idea with this case team?
XCode: Version 13.0 (13A233)macOS Deployment Target: 11.0Install via Swift Package ManagerWhen I compile it prompts: No such module 'Purchases'
I have an existing RevenueCat implementation in SwiftUI using the Purchases SDK 3.14.1 in production.I am currently in the process of upgrading to the latest RevenueCat SDK 4.17.8 and am therefore reconsidering my design choices and looking for best practices / guidance on how to implement an ObservableObject for SwiftUI with Swift concurrency (async/await) using the latest RevenueCat SDK.I have a single entitlement (“premium”) in my app for which I want to broadcast its subscription status through a @Published boolean variable in the ObservableObject, similar to the ‘MagicWeatherSwiftUI’ example provided by RevenueCat:@MainActorclass PurchasesManager: NSObject, ObservableObject { static let shared = PurchasesManager() @Published var customerInfo: CustomerInfo? { didSet { subscriptionActive = customerInfo?.entitlements[Constants.RevenueCat.premiumEntitlement]?.isActive == true } } @Published var subscriptionActive = false private override init()
This seems to be a common ask for help, but Purchases.getOfferings() is not working for me with the error `None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect`. It’s a situation like this other thread (among others), but I think I’ve double-checked all the things to watch out for.Specifically, I had RevenueCat working with my app, which right now is in beta so at most some folks are testing it via Testflight - RevenueCat could retrieve the products then. I then decided to create a dev version of my app using a different bundle ID so that I could simultaneously have the Testflight version and the Expo development build on my phone.Now, Purchases.getOfferings() is working fine on the Testflight version (which has my original bundle ID) but not on my development version (with the new bundle ID). Things I’ve checked:The development build of my app has the new bundle ID I have created a new app in App Store Connect using that new bundle ID I h
Hi,I’ve had two crashes from removedTransactions. Any thoughts on what it might be?thanks16.3.1 (20D67)iPhone 11
I just wanted to report an incorrect code snippet in the iOS subscription offers documentation. I spent several hours trying to debug why it wasn’t working for me in React Native, so it would be helpful if this could be fixed so it can benefit others in the future. Here is the documentation page in question The error is only present in the React Native code snippet provided:This function is undefined because it does not exist in any version of react-native-purchases. I uncovered this issue when I checked the other tabs of the code-snippet and searched inside the /src/purchases.ts file of the react-native-purchases package, and found that there is no method called “getPaymentDiscount”. This line is supposed to be:const paymentDiscount = await Purchases.getPromotionalOffer(product, product.discounts[0]);Note: getPaymentDiscount is replaced by getPromotionalOffer. I have tested this code and after providing the product and discount from the package, I was successfully able to call:Purchas
Hello everyone!I’m facing an issue that everyone has faced, I can’t fetch any of products(subscription) that is registered on app store connect and even in revenue cat. I had checked all my code, no errors, I even read this article but anything has solved my issue.I’m using React native to code the app, and I don’t know if Purchases.configure is working correctly.I want to know where can I read logs to debug, I set this method : “setLogLevel(Purchases.LOG_LEVEL.DEBUG)” because another method(“setLogenabled” something like this) was deprecated but I don’t know where do I could check for every logs with revenuecat and debug the code.Kinds regards.
Hello! I have published my subscriptions in Google Play store recently.During the testing - the subscriptions appear correctly in RevenueCat sandbox. The subscription also appears in RevenueCat when I use release version of the application that’s downloaded from the Play Store with my test account.On the 31th of Oct there was a first subscription purchase by a real user and the purchase appears in Google Play. But there is no sign of this purchase in RevenueCat and also no sign of this purchase in my analytics where I log the purchase when it is received from RevenueCat callback in Android. I’m afraid that the user has paid for the subscription and didn’t receive its value due to RevenueCat not receiving the info about the purchase.I’d value some suggestions for investigating the issue and understanding what exactly is happening. Thanks in advance.
I set up USER_ID to the Purchases.sharedInstance.logInWith() method and then SDK response created parameter always return false.
Hello,I am using the ionic sdks. However for some reason i get the error“There is no singleton instance. Make sure you configure Purchases before trying to get the default instance.”I am using the code below and as you can see I am calling Purchases.configureWith before Purchases.getCustomerInfo(). But not sure why I am getting this error?Can anyone guide as what I am doing wrong?Also attaching screen of my consolePurchases.setDebugLogsEnabled(true); if (context.user) { console.log("before configure"); Purchases.configureWith({ // @ts-ignore apikey: import.meta.env.VITE_RC_ANDROID_KEY, appUserID: context.user, }); console.log("after configure"); try { console.log("before customerinfo"); const customerInfo = await Purchases.getCustomerInfo(); console.log("after customerinfo"); console.log(customerInfo); } catch (e) { console.log(e);
RevenueCat returns an AnonymousID for originalAppUserId instead of the UUID I send it. After the purchase I login to RC with the UUID(RC returns an anonymous ID). Also, at startup after logging in with the UUID in didFinishLaunchingWithOptions, RC returns the same anon ID in the purchases(_ purchases: Purchases, receivedUpdated customerInfo: CustomerInfo) callback.This has a material impact on the use of my multi-user app since I depend on the uuid userId to determine many aspects of the app state.How can I ensure that RC returns the user ID that I gave it?Here’s how I initialize RC at startup in didFinishLaunchingWithOptions: let configuration = Configuration.Builder(withAPIKey: "asdf") .with(appUserID: currentClientUser.id) .with(usesStoreKit2IfAvailable: false) .build()Purchases.configure(with: configuration)Purchases.shared.logIn(currentClientUser.id) { (customerInfo, created, error) in os_log("Purchases.shared.logIn customerInfo: %@", log:
Platform: AndroidStore: Google PlayProduct Type: Monthly SubscriptionRevenueCat Purchases Version: com.revenuecat.purchases:purchases:5.1.0 Hi,I am facing a situation that I'm not sure how to properly handle, related to restore behavior. Up until now, our project had the "Restore behavior" option to "Block restores". Now, we want to start allowing users to restore their subscriptions. The problem is that the Android app has unwanted behavior if we turn that "Restore behavior" option to "Transfer purchases" - to quote the documentation, "Due to platform limitations, purchases will be transferred as soon as you call `configure` if a user's purchases are already associated with another app user ID.This may cause unexpected transfers of purchases between app user IDs, especially for apps with optional logins or users with multiple devices. To prevent this behavior, you should wait to call `configure` until you have the appropriate app user ID for your customer." The app has optional login
I have integrated Revenue cat SDK in my android app but when I upload app bundle on Playstore it rejects by saying that you’re using Cardinal Commerce SDK. Does Revenue cat uses Cardinal Commerce SDK?
I have an app released in all platforms (desktop, mobile, web, browser extension) and has single codebase. I am looking into integrating payments for subscriptions for Pro features.Looking into revenuecat website makes it clear that it supports iOS, Android and Stripe. When I go to the docs section I see SDK guides for Apple and Android. But not so much on stripe. I could not find anywhere that RC does not yet support stripe integration via its SDK. In fact reading the docs I get the opposite impression that the SDK functions work seamlessly across all three platforms.These are the Stripe related pages in the docs -https://www.revenuecat.com/docs/stripe-products - It mentions setting up subscriptions in the stripe dashboard. At the end it links to continue to product setup guide. Nothing to indicate if SDKs are supported or not.https://www.revenuecat.com/docs/entitlements - The product setup guide shows at a high level how things work in RC and puts stripe in same list as other platfor
Error: The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit.I think I found a bug with the react-native-purchases purchaseProduct method on iOS (not android). See the types in the screenshot attached (the function invocation in the screenshot works, without the optional parameters it does not on iOS). I also see it says “subs by default”, but on a subscription purchase it does not work without explicitly supplying the PurchaseTypes.SUBS enum value. Revenue Cat lists the first parameter as required and the other 2 parameters as optional (upgradeInfo?, type?). However, if you don’t supply the second 2 parameters on iOS an exception is thrown with error message - “Error: The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit.” This took me a while to figure out as the types seem to be incorrect here, they should be required because without them this exception i
‘PRORATION_MODE’ enum is not contains the ‘IMMEDIATE_AND_CHARGE_FULL_PRICE’ option. Here is the documentation: https://developer.android.com/google/play/billing/subscriptions#upgrade-downgrade
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.