Get help with your SDK implementation.
Recently active
Hey there, we’ve been integration RC in our Flutter app the last couple of days. Until now everything worked fine and as expected. But suddenly I cannot perform purchases on iOS anymore. (Subscriptions) In fact the iOS Payment sheet is no longer showing up and sometimes I get an error of ‼️ The receipt is not valid.in the debug console. Sometimes this error doesn’t occur and it seems as if the purchased was successful. It doesn’t show up in the RC dashboard anyways in that case. (sanbox data is enabled) I did already try: Logout and Login in with the sandbox tester in iOS settings. Create a new sandbox tester Go back to a earlier git commit (to make sure, that the problem is not related to code changes on our side)Do you have any idea what I might do next? Best Raphael
The following is the console log after running a Purchase! [Purchases] - DEBUG: makePurchase[Purchases] - DEBUG: Purchasing product from package - 20_Annual in Offering Default[Purchases] - DEBUG: PaymentQueue updatedTransaction: 20_Annual 1000000905494521 ((null)) 1000000900724181 - 18.8.0 - [Firebase/Analytics][I-ACS023141] Purchase is a duplicate and will not be reported. Product ID: 20_Annual[Purchases] - DEBUG: Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/394FDF88-2AA3-4C58-A311-3F9B84500545/StoreKit/sandboxReceipt[Purchases] - DEBUG: Found 0 unsynced attributes for App User ID: tu7gcKSaiUN7GmjYdbOSa94pPKs2[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 with status: POST /v1/receipts 200[Purchases] - DEBUG: Serial request done: POST /receipts, 0 requests left in the queue[Purchases] - DEBUG:
hey!I have a hard coded text in my app (“One week trial”) now i want to change my introductory offer to 3 days how can I get this period in Revenuecat so I can set up its text dynamically ?
Hi as some users might have already posted, since upgrading one of my device to iOS 15, GetPurchaserInfo returns null. Rebooting the phone and running the app again will work but on renewal it will once again return null. All is well on iOS 14. Still using code from demo app https://github.com/RevenueCat/purchases-flutter/blob/master/example/lib/main.dart. Any idea of a fix.. ? Thanks ! ✓] Flutter (Channel stable, 2.5.1, on macOS 11.4 20F71 darwin-x64, locale en-GB)[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)[✓] Xcode - develop for iOS and macOS[✓] Chrome - develop for the web[✓] Android Studio (version 4.2)[✓] VS Code (version 1.60.1)[✓] Connected device (2 available) Pubspec: purchases_flutter: ^3.4.5Phone: iPhoneX (iOS 15.0)
Everything works just fine when testing locally and using testflight, but Apple keeps rejecting our App because their purchases fail with “INVALID_RECEIPT” according to our application monitoring.Any clue what could cause this issue?
I am receiving entitlement.isActive == true when expiration date is already long passed.Here’s my code:Purchases.shared.purchaserInfo { (purchaserInfo, error) in if let error = error { complete(.failure(error)) return } if let entitlement = purchaserInfo?.entitlements.all[Self.entitleId] { if entitlement.isActive { UserDefaults.subscriptionCache = SubscriptionCache(isSubscribe: true, lastCheckedDate: Date()) } complete(.success(entitlement.isActive)) } else { complete(.failure(IAPError.noPurchasedItem)) } }Here’s my result: The current time is 10/23 0:00 UTC Please help me with this issue.
I have several offerings setup and my code looks similar to the example for react native although there is an extra error handle as not all cases are handled in the doc example (please see below)What is happening is that I make the purchase, I get a pop up saying “You’re all set - your purchase was successful” but then the code checks typeof purchaserInfo.entitlements.active[this.props.sku] !== 'undefined' and its undefined. So for some reason the purchase is happening but I’m not getting it added to my active entitlements. This error only happens around 50% of the time, so the fact it works sometimes has made it impossible to debug. try { const { purchaserInfo, productIdentifier } = await Purchases.purchasePackage(this.state.package); if (typeof purchaserInfo.entitlements.active[this.props.sku] !== 'undefined') { this.completePurchase(this.props.sku); //Add to our database } else { Alert.alert('Oops!', 'We ran into an issue... please try again later.')
I have integrated RevenueCat into my Unity project version 2021.1.17. It worked fine on iOS but I can’t get it to work on Android. At first, I tried installing it alongside Unity IAP but it did not work. Then I tried removing Unity IAP but still cannot get RevenueCat to work. After launching my app, I get the following series of errors that show up on Android Logcat: First, this error from UnityAds (I need RevenueCat and UnityAds to work together): Error UnityAds com.unity3d.services.store.StoreBilling.asInterface() (line:7) :: Billing service stub not found: com.android.vending.billing.IInAppBillingService$Stub: Didn't find class "com.android.vending.billing.IInAppBillingService$Stub" on path: DexPathList[[zip file... Next, this error from RevenueCat: Error Purchases {"purchaserInfo":{"entitlements":{"all":{},"active":{}},"activeSubscriptions":[],"allPurchasedProductIdentifiers":[]…Finally, when I try to purchase something, this error from RevenueCat: Error Purchases {"error":{"code":
When the phone is offline I am relying on these 2 parameters to make sure the user has access to the premium entitlement:purchaserInfo.entitlements[premiumEntitlementID].isActive == true purchaserInfo.requestDate is not older than 24hIf the premium entitlement is active but the purchaserInfo.requestDate is older than 24h, I block the access to the premium features and kindly request the user to connect to the internet to keep enjoying those features.Now for some reason I have noticed that if I grant a user with lifetime access, it seems like purchaserInfo.requestDate gets roughly stuck to the same date/time as when I granted lifetime access. The user can thus not use the premium features after 24h even if the phone has an active internet connection. This obviously defeats the purpose of granting lifetime access.To give more details I call Purchases.shared.purchaserInfo() whenever the app becomes active and also as the app is active, whenever the internet connection becomes active. I sa
Hi !In my iOS application (iOS 15.0), I would like to implement the new beginRefundRequest(in:)func beginRefundRequest(in scene: UIWindowScene) async throws -> Transaction.RefundRequestStatusReference available here: https://developer.apple.com/documentation/storekit/transaction/3803220-beginrefundrequest) The fact is that, at the moment I can’t figure out how to get `Transactions` from `SKPaymentQueue` from RevenueCats SDK… I’ve found stuffs in `RCStoreKitWrapper` > `RCStoreKitWrapperDelegate` to get `updatedTransaction` delegate but these are private/protected so I can’t have any access to them outside the SDK…So here is my question: How can I add this new `beginRefundRequest` in my app ? :-)Thanks a lot for your answerBest regards Jayjay
`checkTrialOrIntroductoryPriceEligibility` API is returning eligible for a subscription where I have already used the intro offer. When purchasing, the payment sheet shows that I am not eligible for intro pricing and charges me for the regular price (correctly). This is what the debug log shows: [Purchases] - DEBUG: Attempting to check intro eligibility locally[Purchases] - ERROR: The data object identifier couldn't be found on the receipt.[Purchases] - ERROR: Couldn't check intro eligibility locally, error: Couldn't find an object identifier of type data in the receipt[Purchases] - ERROR: There was an error when trying to parse the receipt locally, details: Couldn't find an object identifier of type data in the receipt I expect the result to be .unknown if there was an error when parsing the receipt.
In the revenuecat documentation, the image of the example app has a string of text about a free trial. However, in the demo app, I don’t see anything that handles free trials. I do see some fields passed to me that I could use, but I have two questions. 1. Does revenuecat add text based on free trials automatically? Since I can’t find anything about them in the docs but the image shows it, I just want to confirm it isn’t happening by default.If I have to handle it manually, does anyone have a good example? I’m working in react native, so I’m thinking something like this but just want to verify the fields are what I think they are before I publish.{intro_price ? <text>Includes {intro_price_period} {intro_price_period_unit} {intro_price > 0 ? intro_price_string : 'free'} trial. Cancel before {intro_price_period} and nothing will be billed.</text> : null}
Hello we have an app that i use flutter. The apple store send me this message Guideline 3.1.1 - Business - Payments - In-App PurchaseWe found that your app offers in-app purchases that can be restored but does not include a "Restore Purchases" feature to allow users to restore the previously purchased in-app purchases, as specified in the "Restoring Purchase Products" section of the In-App Purchase Programming Guide:"Users restore transactions to maintain access to content they've already purchased. For example, when they upgrade to a new phone, they don't lose all of the items they purchased on the old phone. Include some mechanism in your app to let the user restore their purchases, such as a Restore Purchases button." i use this code: try { PurchaserInfo restoredInfo = await Purchases.restoreTransactions(); // ... check restored purchaserInfo to see if entitlement is now active } on PlatformException catch (e) { // Error restoring purchases }]\ but they say it doesnt work. Do you
I’m looking to confirm some of the behaviour around the expiration_at_ms field on the PRODUCT_CHANGE event.When we receive a PRODUCT_CHANGE event (which could be an upgrade, downgrade, or crossgrade), I understand that the expiration_at_ms will be the expiration of the old product. (The docs here make that clear: https://docs.revenuecat.com/docs/managing-subscriptions#considerations). What I’m less certain about is how it behaves for the different stores.Suppose we had the following situation: a monthly subscription was purchased Nov. 1, and is set to renew on Dec. 1. If a product change was triggered on Nov. 15th, Are the following assumptions correct?When on the Play Store:Performing a downgrade: downgrades are delayed until the next renewal, so expiration_at_ms should be Dec. 1. Performing an upgrade: should be immediate, so expiration_at_ms should be Nov. 15th Performing a crossgrade: should be immediate, so expiration_at_ms should be Nov. 15th.=When on the App Store:Performing
Hello,We are using RevenueCat to validate subscriptions in our app.But now Apple Reject our new build because of error "RevenueCatException: message: The receipt is missing., code: 9, underlyingErrorMessage: , readableErrorCode: MISSING_RECEIPT_FILE"We have read an article about this problem:https://docs.revenuecat.com/docs/errors#-missing_receipt_fileBut we do not understand how to fix this error.And how we can pass Apple Review…Has anyone got this problem?
try { ... final PurchaserInfo info = await Purchases.purchasePackage(package); if (info.entitlements.all.containsKey('plus') && info.entitlements.all['plus']!.isActive) { // amplitude logging for new subscription // show toast to user to indicate success }} on PlatformException catch (e) { ...}We are using Flutter and support purchasing subscriptions (‘plus’ entitlement) and we noticed that our manual logging seems to be heavily undercounting the number of new subscriptions we get compared to RevenueCat’s dashes.We verified that the entitlement and products are defined properly. Our understanding is that if the purchase succeeds, then PurchaserInfo should always have the ‘plus’ entitlement active. Are there cases where it’s expected for the entitlement to be inactive when the purchase succeeds? Or is there something else we can do to debug?
Hi, Apologies if I have missed an obvious property. I am referring to displaying the duration, specifically before a user has purchased a subscription and is looking at the landing page of offers available. It seems to get duration for an offer, you need to get the package type, and then transform accordingly into your preferred display value, ie PackageType.annual => ‘12 Months’. Looks like there should be a ‘subscriptionPeriod’ property somewhere, that looks like ‘P1Y’, but I guess it is higher than the offer, perhaps in the offering? The introductory price then has a separate duration code, something like ‘P6M’, so you need another function to transform that into something readable. ie ‘6 Months’ and perhaps another function if you wanted to get the duration value and calculate something like price per day or month. It would be nice to have a simple duration property, preferably as a Duration object in the Flutter SDK, which would reduce the need for transforming codes into St
We launched our app using Anonymous App User IDs. Now as we have some subscribers we would like to use our own App User IDs for all our users (paying and non-paying). To implement own App User IDs the documentation suggests either providing our own App User ID in configure/setup or in logIn. However it’s not clear form the docs if this will cause the paying user loosing their entitlements for the current app session or until they restore purchases. For us this would be a very bad user experience. We would really like to avoid it. How to properly migrate our subscribers to our own App User IDs without affecting or loosing subscribers entitlement details?
I created a 6 month subscription entitlements, and run my app in sandbox. All was fine. However, the next day, I found that the entitlements was no longer active. As the valid period was not 6 month, but just 12 hours. Was this normal? Would this be the correct 6 month in production if I was not in sandbox? Or there were something I was missing?
I ran my app on the Xcode iPhone SE iOS 12 Simulator and was surprised that Purchases.shared.offerings { (offerings, error) returned a value. But also that the offering was corrupted. My available packages in offerings.current are 2 subscription and 1 Non-Consumable but 3 subscriptions were returned. The Non-Consumable was incorrectly defined as a subscription.On iOS 14 simulators Purchases.shared.offerings { (offerings, error) returns nothing as expected.Can anyone explain what I am seeing here please.The app is working in production.regardsPeter
Is Apple Search Ads Attribution currently supported when integrating iOS with the Unity SDK?
Dear all,We are facing a problem with testing whether our events for subscriptions and purchases are being sent from RevenueCat to Facebook. We have been following this documentation: https://docs.revenuecat.com/docs/facebook-ads#2-send-device-data-to-revenuecat. We got expected results in the RevenueCat console, but we can’t determine where and how to check those events in the Facebook dashboard.Is there any updated guide for this?Kind regards,Aleksandar
Hi, This question relates to interaction with StoreKit UIAlertViews. When a user start a purchase and the system shows “Sign-in” alert, if user taps ‘Cancel’ button, purchasePackage sets ‘userCanceled’ to true. However if user taps ’Cancel’ when “Subscription Terms” alert (next alert after ‘Sign-in’ alert) is displayed, then RevenueCat doesn’t set ‘userCanceled’ to true, it returns a valid error object with message “There was a problem with the App Store.” Shouldn’t userCanceled be true as well here?
Hi, We have a sponsorship system on our RevenueCat app that uses Stripe, We can’t figure how to offer free months to our users when the get a new referee, Thanks for your help, Théo
This is my first question here, please be patient with me. I am not a programming expert and need some help. I have followed steps up to creating 3 subscriptions on both App and Play store. I want to give 3 types of subscriptions, all annual type. The feature the subscriptions will unlock are as follows:‘10_Annual’ - This will allow the admin to add 10 people to his team. ‘20_Annual’ - This will allow the admin to add 20 people to his team. ‘50_Annual’ - This will allow the admin to add 50 people to his team.Up to now I have created the entitlements, which have the same IDs as defined in app & play stores. I am now having short circuits in my head proceeding with entitlements and offerings. I am not able to fully understand what steps I should be taking when creating entitlements and offerings and need some advice on structure of it please. Thank you!
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.