Frequently Asked Questions
How can a user cancel a subscription in my app?#
For both iOS and Android your users cannot cancel subscriptions inside your app. You need to direct your users to iTunes/the App Store or Google Play.
You can do this on iOS 12 or later (for earlier iOS versions, use this URL):
You can do this on Android:
(change
YOUR_PACKAGE_NAMEandYOUR_PRODUCT_ID)More on
Linkingin React Native: https://facebook.github.io/react-native/docs/linking
Can I buy product right away skipping fetching products if I already know productId?#
You could only in Android in
react-native-iap@^2.*.However, now you should always
fetchProductsfirst in both platforms. It is because AndroidBillingClienthas been updatedbillingFlowParamsto include SkuDetails insteadskustring which is hard to share betweenreact-nativeandandroid.It happened since
com.android.billingclient:billing:2.0.*.Therefore we've planned to store items to be fetched in Android before requesting purchase from
react-nativeside, and you should always fetch list of items to “purchase” before requesting purchase.
How do I validate receipt in iOS?#
How do I validate receipt in Android?#
Offical doc is here.
I've developed this feature for other developers to contribute easily who are aware of these things. The doc says you can also get the
accessTokenvia play console without any of your backend server.You can get this by following process:
- Open Google Play Console> Select your app > Development tools > Services & APIs > Find in “Your license key for this application”. reference.
How to make consumable product in Android developer mode?#
- If you are facing
"You already own this item"on developer(test) mode, you might check related issue #126
How do I use react-native-iap in Expo?#
- You should detach from
expoand getexpokitout of it. - Releated issue in #174.
How do I handle promoted products in iOS?#
- Offical doc is here.
- No initial setup needed from
4.4.5.
Somewhere early in your app's lifecycle,
call initConnection first (see above), then
add a listener for the iap-promoted-product event:
Using Face ID & Touch to checkout on iOS#
After you have completed the setup and set your deployment target to
iOS 12, FaceID and Touch to purchase will be activated by default in production.Please note that in development or TestFlight, it will NOT use FaceID/Touch to checkout because they are using the Sandbox environment.