We've recently upgraded to RevenueCat SDK 8.6.1 in our React Native app and noticed a change in how the paywall events are triggered, for both our old Paywall v1 and new Paywall v2.
Previously, when a user subscribed, the onPurchaseCompleted
method was called as expected. However, in the latest version, users who start a trial now first trigger onPurchaseStarted
and then onDismiss
, without onPurchaseCompleted
being called.
Here’s our implementation:
1const handlePurchaseStarted = useCallback(({ packageBeingPurchased }: { packageBeingPurchased: PurchasesPackage }) => {2 posthog.capture("onboarding_paywall_purchase_started", {3 packageIdentifier: packageBeingPurchased.identifier,4 });5}, [posthog]);67const handlePurchaseCompleted = useCallback(async ({ storeTransaction }: { storeTransaction: PurchasesStoreTransaction }) => {8 posthog.capture("onboarding_paywall_purchase_completed", {9 transactionId: storeTransaction.transactionIdentifier,10 productIdentifier: storeTransaction.productIdentifier,11 });1213 await onComplete();14}, [onComplete, posthog]);1516const handleDismiss = useCallback(async () => {17 posthog.capture("onboarding_paywall_dismissed");18 await onComplete();19}, [onComplete, posthog]);2021<RevenueCatUI.Paywall22 // only works for paywall v123 options={{ displayCloseButton: isDismissible }}24 onPurchaseStarted={handlePurchaseStarted}25 onPurchaseCompleted={handlePurchaseCompleted}26 onDismiss={handleDismiss}27/>28
We’re trying to confirm whether this is an expected change in SDK 8.6.1 or if there’s something we need to adjust in our implementation.
Has anyone else observed this behavior after upgrading? Any insights would be greatly appreciated!
Current versions:
"react-native-purchases": "^8.6.1"
"react-native-purchases-ui": "^8.6.1"
"react-native": "0.76.7"
"expo": "52.0.36"