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

2

(React Native) Cannot connect to iTunes Store

Using physical device with a almost fresh Sandbox account with "react-native-purchases" = 2.2.1 Stacktrace and error: https://gist.github.com/ruckus/bd46b2e70ac0a318ab7015f17fda75af Full Failed : error 0:61 [61] 2019-06-07 14:58:51.856446-0700 Stellashare[13684:2648399] [Purchases] - DEBUG: PaymentQueue updatedTransaction: monthly3 A55A566A-83D3-48FC-93D9-B26C9E7B00E2 (Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}) (null) - 2 2019-06-07 14:58:51.856904-0700 Stellashare[13684:2648399] [Purchases] - ERROR: There was a problem with the App Store. 2019-06-07 14:58:51.875685-0700 Stellashare[13684:2648399] [Purchases] - DEBUG: Finishing monthly3 A55A566A-83D3-48FC-93D9-B26C9E7B00E2 ((null)) 2019-06-07 14:58:51.907323-0700 Stellashare[13684:2648399] [Purchases] - DEBUG: PaymentQueue removedTransaction: monthly3 A55A566A-83D3-48FC-93D9-B26C9E7B00E2 ((null) Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}) { NSLocalizedDescription = "Cannot connect to iTunes Store"; } - 2 2019-06-07 14:58:51.922 [info][tid:com.facebook.react.JavaScript] { [Error: There was a problem with the App Store.] framesToPop: 1, code: '2', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '2 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '3 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '4 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '5 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '6 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '7 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '8 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '9 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '10 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '11 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '12 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '13 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '14 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '15 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '16 Stellashare 0x0000000104eab594 main + 124', '17 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSUnderlyingError: { code: '0', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104fcf298 RCTJSErrorFromCodeMessageAndNSError + 960', '2 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '3 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '4 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '5 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '6 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '7 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '8 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '9 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '10 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '11 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '12 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '13 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '14 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '15 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '16 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '17 Stellashare 0x0000000104eab594 main + 124', '18 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSLocalizedDescription: 'Cannot connect to iTunes Store' }, message: 'underlying error', domain: 'SKErrorDomain' }, NSLocalizedDescription: 'There was a problem with the App Store.', readable_error_code: 'STORE_PROBLEM' }, domain: 'RCPurchasesErrorDomain', userCancelled: false, line: 2270, column: 26, sourceURL: 'http://192.168.7.235:8081/index.bundle?platform=ios&dev=true&minify=false' } 2019-06-07 14:58:51.922180-0700 Stellashare[13684:2648508] { [Error: There was a problem with the App Store.] framesToPop: 1, code: '2', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '2 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '3 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '4 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '5 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '6 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '7 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '8 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '9 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '10 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '11 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '12 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '13 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '14 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '15 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '16 Stellashare 0x0000000104eab594 main + 124', '17 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSUnderlyingError: { code: '0', nativeStackIOS: [ '0 Stellashare 0x0000000104fcef74 RCTJSErrorFromCodeMessageAndNSError + 156', '1 Stellashare 0x0000000104fcf298 RCTJSErrorFromCodeMessageAndNSError + 960', '2 Stellashare 0x0000000104f66a50 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '3 Stellashare 0x00000001051fa994 -[RNPurchases rejectPromiseWithBlock:error:] + 272', '4 Stellashare 0x00000001051f8b44 __55-[RNPurchases makePurchase:oldSku:type:resolve:reject:]_block_invoke + 200', '5 Purchases 0x0000000105e6f698 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '6 Purchases 0x0000000105e6fb30 -[RCPurchases dispatch:] + 60', '7 Purchases 0x0000000105e6f4b0 -[RCPurchases storeKitWrapper:updatedTransaction:] + 396', '8 Purchases 0x0000000105e71644 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 516', '9 libdispatch.dylib 0x0000000105adf6f0 _dispatch_call_block_and_release + 24', '10 libdispatch.dylib 0x0000000105ae0c74 _dispatch_client_callout + 16', '11 libdispatch.dylib 0x0000000105aee6fc _dispatch_main_queue_callback_4CF + 1360', '12 CoreFoundation 0x0000000229f8ac1c <redacted> + 12', '13 CoreFoundation 0x0000000229f85b54 <redacted> + 1924', '14 CoreFoundation 0x0000000229f850b0 CFRunLoopRunSpecific + 436', '15 GraphicsServices 0x000000022c18579c GSEventRunModal + 104', '16 UIKitCore 0x00000002568ff978 UIApplicationMain + 212', '17 Stellashare 0x0000000104eab594 main + 124', '18 libdyld.dylib 0x0000000229a4a8e0 <redacted> + 4' ], userInfo: { NSLocalizedDescription: 'Cannot connect to iTunes Store' }, message: 'underlying error', domain: 'SKErrorDomain' }, NSLocalizedDescription: 'There was a problem with the App Store.', readable_error_code: 'STORE_PROBLEM' }, domain: 'RCPurchasesErrorDomain', userCancelled: false, line: 2270, column: 26, sourceURL: 'http://192.168.7.235:8081/index.bundle?platform=ios&dev=true&minify=false' } 2019-06-07 14:58:51.923 [warn][tid:com.facebook.react.JavaScript] 'alerting, !error.userCancelled: ', 'There was a problem with the App Store.' 2019-06-07 14:58:51.922788-0700 Stellashare[13684:2648508] 'alerting, !error.userCancelled: ', 'There was a problem with the App Store.'

Posted by cody caughlan 2 months ago

4
ANSWERED

Best Practices for Stripe Payments/Entitlements with Single Page Apps (Javascript)

I'm excited to get RevenueCat implemented and wondering how to track and manage entitlements when using the web-based payments / Stripe integration. This is for an Ionic 4 / Angular app with native iOS, Android, and web users, so we're planning to use the Cordova plugin for native. Overall we're hoping to let users sign up on native and get Pro access when they login on the web, and vice versa. After reading the docs, I'm wondering the following: 1) If the user is on our web-based version, and we're treating RC as the single source of truth about their subscription, then what's an appropriate way to query their current entitlements/subscription level (e.g. when logging into the web version)? There is no web API / Javascript library, so I'm guessing we need to set up our own server-side logic that calls the RC /subscribers API with the app user's ID to get their current entitlements, and relay this to our browser app? Or would it be better to track their current entitlement (e.g. whether they have pro or not) within our own database and try to keep it in sync via web hooks? 2) The Web Payments docs in point 5 (https://docs.revenuecat.com/docs/stripe#section-5-send-stripe-tokens-to-revenuecat) say we can send our Stripe subscriptions to RC through the POST receipt endpoint. Just to clarify - is this necessary for us to do for ongoing subscriptions, or does that happen automatically? Is this just for migrating legacy Stripe subscriptions? Appreciate any advice on best practices here. Thanks, Tom

Posted by Tom McLellan 2 months ago

3

(Android) Error: There was a problem with the Play Store.

I am getting the below issue while trying to get the payment done on my sandbox test device. It goes to the payment page and then says the payment was successful but from Purchases i get the below error message. Could you help me figure out where am I going wrong ? Screenshot 2019-05-24 at 6 11 06 PM I am using the following versions: "react-native": "0.58.5", "react-native-purchases": "^2.1.2", implementation "com.google.android.gms:play-services-wallet:16.0.1", my android settings are : buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = "28.0.0" googlePlayServicesAuthVersion = "16.0.1" and the following dependencies: classpath 'com.android.tools.build:gradle:3.4.0' classpath 'com.google.gms:google-services:4.0.1' classpath 'com.android.support:support-media-compat:28.0.0' classpath 'com.google.android.gms:play-services-basement:16.0.1' I am facing the same issue on iOS as well. below is the following error message i am getting: 'Error occurred while handling payment: ', { [Error: There was a problem with the App Store.] framesToPop: 1, code: '2', domain: 'RCPurchasesErrorDomain', userInfo: { NSUnderlyingError: { code: '0', message: 'underlying error', domain: 'SKErrorDomain', userInfo: { NSLocalizedDescription: 'Cannot connect to iTunes Store' }, nativeStackIOS: [ '0 fitlog 0x00000001050966a8 RCTJSErrorFromCodeMessageAndNSError + 156', '1 fitlog 0x00000001050969cc RCTJSErrorFromCodeMessageAndNSError + 960', '2 fitlog 0x000000010503d0e0 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '3 fitlog 0x00000001052f67fc -[RNPurchases rejectPromiseWithBlock:error:] + 272', '4 fitlog 0x00000001052f4d64 __56-[RNPurchases makePurchase:oldSkus:type:resolve:reject:]_block_invoke + 200', '5 Purchases 0x0000000106284908 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '6 Purchases 0x0000000106284c68 -[RCPurchases dispatch:] + 60', '7 Purchases 0x0000000106284720 -[RCPurchases storeKitWrapper:updatedTransaction:] + 388', '8 Purchases 0x00000001062864a8 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 464', '9 libdispatch.dylib 0x00000001063276f0 _dispatch_call_block_and_release + 24', '10 libdispatch.dylib 0x0000000106328c74 _dispatch_client_callout + 16', '11 libdispatch.dylib 0x00000001063366fc _dispatch_main_queue_callback_4CF + 1360', '12 CoreFoundation 0x0000000228afdec0 + 12', '13 CoreFoundation 0x0000000228af8df8 + 1924', '14 CoreFoundation 0x0000000228af8354 CFRunLoopRunSpecific + 436', '15 GraphicsServices 0x000000022acf879c GSEventRunModal + 104', '16 UIKitCore 0x0000000254f6bb68 UIApplicationMain + 212', '17 fitlog 0x0000000104f25a20 main + 124', '18 libdyld.dylib 0x00000002285be8e0 + 4' ] }, NSLocalizedDescription: 'There was a problem with the App Store.', readable_error_code: 'STORE_PROBLEM' }, nativeStackIOS: [ '0 fitlog 0x00000001050966a8 RCTJSErrorFromCodeMessageAndNSError + 156', '1 fitlog 0x000000010503d0e0 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.129 + 176', '2 fitlog 0x00000001052f67fc -[RNPurchases rejectPromiseWithBlock:error:] + 272', '3 fitlog 0x00000001052f4d64 __56-[RNPurchases makePurchase:oldSkus:type:resolve:reject:]_block_invoke + 200', '4 Purchases 0x0000000106284908 __50-[RCPurchases storeKitWrapper:updatedTransaction:]_block_invoke + 168', '5 Purchases 0x0000000106284c68 -[RCPurchases dispatch:] + 60', '6 Purchases 0x0000000106284720 -[RCPurchases storeKitWrapper:updatedTransaction:] + 388', '7 Purchases 0x00000001062864a8 -[RCStoreKitWrapper paymentQueue:updatedTransactions:] + 464', '8 libdispatch.dylib 0x00000001063276f0 _dispatch_call_block_and_release + 24', '9 libdispatch.dylib 0x0000000106328c74 _dispatch_client_callout + 16', '10 libdispatch.dylib 0x00000001063366fc _dispatch_main_queue_callback_4CF + 1360', '11 CoreFoundation 0x0000000228afdec0 + 12', '12 CoreFoundation 0x0000000228af8df8 + 1924', '13 CoreFoundation 0x0000000228af8354 CFRunLoopRunSpecific + 436', '14 GraphicsServices 0x000000022acf879c GSEventRunModal + 104', '15 UIKitCore 0x0000000254f6bb68 UIApplicationMain + 212', '16 fitlog 0x0000000104f25a20 main + 124', '17 libdyld.dylib 0x00000002285be8e0 + 4' ], userCancelled: false, line: 13307, column: 26, sourceURL: 'http://192.168.1.8:8081/index.bundle?platform=ios&dev=true&minify=false' }

Posted by Dhivya 2 months ago

4

Free Trials before iOS 11.2

Hi, we plan to introduce subscriptions in our application and considering to integrate RevenueCat. Our current implementation (for testing) is using a JSON file on our own servers containing productIDs (and additional information like, which are active) instead of hardcoding the product identifiers to be fetched from StoreKit. The functionality and handling (especially for edge cases) of RevenueCat seems to be great. However, there are some things that are a bit unclear to me: 1) We plan to offer free trials for subscriptions and also support users before iOS 11.2. Free trails (in contrast to Pay as you go and Pay in advance) work before iOS 11.2, however the trial info (introductory price) is only available as a property starting in iOS 11.2. To show the trial information (e.g. duration) to users before iOS 11.2 I am storing these currently in the remote JSON file and only request these information from SKProduct for users running iOS 11.2 and higher. Where can I add this info in RevenueCat considering I want to get rid of the remote JSON file? 2) The current logic in RevenueCat applies that in an offering at least one product should be active. Let's consider an example where I have a monthly and yearly offering and want to temporarily not show the monthly offering in the app for new subscribers. As at least one product must be active in any offering, where can I store this info? Is this possible in RevenueCat or do I need to run my own remote server providing this additional information. Considering 1) and 2) maybe it would make sense to have a custom text field, where are plist or json string could be inserted for additional product info? Thanks for answering these questions in advance, Hendrik

Posted by Hendrik Holtmann 3 months ago