Get help with your SDK implementation.
Recently active
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
Hello, End-to-end testing of IAP is painful. On iOS, I can’t do Storekit testing on simulator without running through Xcode (how to implement in headless ci?). Also I can’t do Storekit testing on a release archive. I don’t have the budget to run on real devices. On Android, it kind of works, but is especially painful because automating the purchase UI is not trivial and flaky. While I could mock at my app level (i.e. at JS level in my case), I don’t get any guarantee that the purchases will work in the real world. I already had so many issues with purchases working here and not there, that’s why I’m now using RC. I don’t want to have responsibility over this part of the code. It would be very convenient to be able to set a different API key in Purchases.configure() and then all the purchases would success without going through real App store / Play store stuff. Different API keys could also be created with different expected behaviours such as “Always approve” or “Always declines”. Tho
Using Flutter, I’ve built out subscriptions for Android & iOS using the RevenueCat Flutter SDK. I was a bit confused as to why there wasn’t support for the Web Platform - so now I am having trouble wrapping my head around how to integrate payments on the web platform. I have read through all of the documentation regarding integrating web payments with Stripe, and i have the Stripe integration set up - however, I feel that hasn’t given me a good path to move forward on. Essentially - these are the methods I use to get subscriptions working in my app: // Should I fetch products from RevenueCat or Stripe on the web?Future<List<Product>> fetchProducts();// Should I grab customer information from RevenueCat or Stripe on the web?Future<bool> identify({required User user});// I assume this should be handled by StripeFuture<bool> purchase({required Product product}); The flow of it all is quite difficult for me to understand. For the mobile apps - revenuecat Is t
We need to get a unique purchase ID for non-subscription purchases. It may take some time for the item purchased to be delivered. At this time, we want to show the loading screen. For this, the user device should be able monitor the purchase status. According to our logic, for this purpose the device should periodically send requests with the transaction ID to find out the status on the backend.The webhook gives us the transaction_id:{ "...": "...", "transaction_id": "2000000263221092", "original_transaction_id": "2000000263221092", "...": "...", "id": "3C725F74-BB80-40F0-A409-67F5352D9FCD", "app_id": "appf1fcec6c3f"}The same transaction_id is available in the RevenueCat SDK logs:```plain[Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST receipts[Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts[Purchases] - DEBUG: ℹ️ API request completed: POST /v1/receipts (200)[Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Finished[Purchases]
Is there a way to turn off sandbox in a build with debugger attached to it? I have an app that had in app purchases before I have added revenue cat. I wanna test upgrading user from the old purchase to new one. However this is not possible in sandbox because I could not think of way to get the receipt working. (replicate the old purchase)I have a subscription that is approved by apple and should work in prod and I also bought the old purchase that I am upgrading from. Currently I get an error saying:App running in sandbox without a receipt file. Restoring transactions won't work until a purchase is made to generate a receipt. This should not happen in production unless user is logged out of Apple account I would like to test this (as in production) before I actually release this to production. Any idea how could I go about it?
Hi, I'm trying to use this endpoint but it always returns the same error. {"code":7227,"message":"Content-Type not application/json"}I tried a few options of the Content-Type but nothing changed. curl --request POST \ --url https://api.revenuecat.com/v1/subscribers/****/subscriptions/****/revoke \ --header 'Accept: text/plain' \ --header 'Authorization: Bearer *****' \ --header 'Content-Type: text/plain'Thanks in advance.
Hi,I am adding revenueCat into my app and have copied parts of the purchase product code into a new form. I am using flutter 3.3.10 and it is not compiling the example without a lot of exceptions. I think I have addressed most issues, however I am stumped on the customerInfo.In the example its declaired at the start of the class as:CustomerInfo _customerInfo;However flutter will not accept this and requires it to be either initialise or marked as late. If you mark it as late then you get an exception error as soon as you try and run the code long before its set.How do you initialise _customerInfo?Is there example code that works with the latest release of flutter?many thanks
Sorry for the basic question, maybe it’s trivial, but I promise that I tried to find solutions online before posting. :) So I have created subscriptions in both Android and Apple stores, setup the entitlements, offerings and products in RevenueCat for both platforms. The subscriptions show up on the Android emulator and also a real device, but they for some reason don’t load on my TestFlight builds on iOS. The status of the subscriptions is “Ready to Submit” on the app store connect page, but I don’t want to submit an actual “live” version yet on the app store, only test it first in TestFlight. What am I missing? I also read somewhere that I need to upload a debug build to TestFlight, not a release build to have the subscriptions show up. How do I go about it? THanks a lot in advance!
My Flutter app is released on iOS but I’m looking to add macOS support. My app builds, installs, and runs on my M1 Macbook Pro.System:Flutter 3.7.3 (channel stable)Dart 2.19.2DevTools 2.20.1RevenueCat Flutter package (purchases_flutter) 4.10.0Ventura 13.2.1XCode 14.2Flutter doctor has not errorsThe following error:<...> [Purchases] - ERROR: 😿‼️ Error performing request.<...> [Purchases] - DEBUG: ℹ️ API request failed: GET /v1/subscribers/$RCAnonymousID:<...>/offerings: Error performing request.<...> [Purchases] - ERROR: 🍎‼️ Error fetching offerings - The operation couldn’t be completed. (RevenueCat.OfferingsManager.Error error 0.)Underlying error: The operation couldn’t be completed. (RevenueCat.NetworkError error 2.)<...> [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Finished<...> [Purchases] - ERROR: 😿‼️ Error performing request.<...> [Purchases] - DEBUG: ℹ️ Serial request done: GET subscribers/$RCAnonymousID%<...>/offerings, 0 requ
When attempting to purchase a product I’m receiving an alert from Apple that says "You are not authorised to make purchases of this InApp in Sandbox at this time." (image below). Has anyone encountered this before and has a solution?
I have tested non-subscription purchases in the sandbox, but I am having difficulty deleting user data. Is this the same as when running the app in production version? Also, I'm concerned about the possibility of users requesting a refund and the app not returning to its regular version. I hope my questions can be answered quickly since I'm new to using this service
I’ve waited for over 24 hours (36 hours now), the productIDs all match, and everything works in testflight, all the subscriptions are approved in App Store Connect. However i still can’t collect any subscriptions on the app store build.I did recently change the reference names, but can see nowhere in revenue cat where the reference names are even mentioned, so doubt that would be the issue. Is there any further advice or information anyone can spare us? Struggling to see what we could be missing as everything looks to be in good shape based on the tests, sandbox and logs.
Skipping products request for these products because they were already cached: ["company.product.id"] INFO: ℹ️ Receipt parsed successfully2023-02-16 21:00:14.398595+0200 MyAPP[96563:5580791] [Purchases] - DEBUG: ℹ️ PostReceiptDataOperation: Posting receipt: {This is what I see in the log. When testing consumable purchases according to this guide https://www.revenuecat.com/docs/non-subscriptionsis it expected behaviour on sandbox which won’t happen in production or I have error in my setup? My Expected result is that payment form shows up on each consumable purchase
Hey community, I ran into a problem that I can't solve.When i execute Purchases.shared.purchase(package: Package) as async throws function, i cant really stop the Task { } higher in the call hierarchy and because of that, when user tap subscribe/buy → Task with Purchases.shared.purchase starts to execute → then user close VC or navigate to another → Task is still continues to execute and shows a system bottom sheet with purchase description, price and buy button, but I'm doing everything to cancel task. But nothing works.Is there any way to cancel a Task that has already started a RevenueCat system call to the StoreKit system ???
I realize I’m using beta versions of macOS Ventura and Xcode so this may be an Apple bug, but I was wondering if anyone has had troubles with subscribing recently?I even created a new testing email address in App Store Connect, but I still have problems. I can go through the subscription process, but when it gets to the end and displays the “Your all set” alert, I get an “unknown error” appear after that and the subscription doesn’t take.Here’s some of the error messages I’m seeing in the log:[Purchases] - DEBUG: ℹ️ StoreKit1Wrapper (0x0000600002515d40) removedTransaction: tf_annual_sub_1 (Couldn’t communicate with a helper a2023-02-20 14:59:45.422071-0700 Tap Forms Pro[25049:318385] [Purchases] - ERROR: 💰 Product purchase for 'tf_annual_sub_1' failed with error: Error Domain=RevenueCat.ErrorCode Code=0 "Unknown error." UserInfo={source_function=handleFailedTransaction(_:), NSUnderlyingError=0x600000c00f00 {Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper
Title mostly says it all. :)Currently I have two subscription products configured: a yearly and a monthly. I thought it’s nicer to tie the trial to the monthly subscription. But the main question is whether I should add a dedicated button saying “Start trial” or something like that, even though if I understood correctly (please correct me if I’m wrong) my monthly subscription is the actual trial product, and there’s no standalone trial available.So again, the question if it’s best practice to add a dedicated Trial button even though I have the button for the monthly subscription already on my paywall.Thanks!
I’m testing my react native app. I ‘bought’ 1-month subscription, I guess there’s automatic renewal. But after some minutes I get empty active object: {"active": {}, "all": {"premium": {"billingIssueDetectedAt": null, "billingIssueDetectedAtMillis": null, "expirationDate": "2023-02-17T17:45:49.000Z", "identifier": "premium", "isActive": false, "isSandbox": true, "latestPurchaseDate": "2023-02-17T17:30:49.000Z", "originalPurchaseDate": "2023-02-17T17:23:53.000Z", "ownershipType": "UNKNOWN", "periodType": "NORMAL", "productIdentifier": "com.NAME.1month", "store": "PLAY_STORE", "unsubscribeDetectedAt": null, "unsubscribeDetectedAtMillis": null, "willRenew": true}}}If I want to buy it again, it says that I already have subscription.Is it testing limit or there is something wrong with my subscription?
Hi there,I could not find an example or answer to this - but how do I display all products from an offering (along with price AND subscription duration)? Ideally I can iterate the offerings?.current.availablePackages correct?But then, how do I get each of the package price AND sub duration? Thanks in advance,
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.