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:
const handlePurchaseStarted = useCallback(({ packageBeingPurchased }: { packageBeingPurchased: PurchasesPackage }) => {
posthog.capture("onboarding_paywall_purchase_started", {
packageIdentifier: packageBeingPurchased.identifier,
});
}, [posthog]);
const handlePurchaseCompleted = useCallback(async ({ storeTransaction }: { storeTransaction: PurchasesStoreTransaction }) => {
posthog.capture("onboarding_paywall_purchase_completed", {
transactionId: storeTransaction.transactionIdentifier,
productIdentifier: storeTransaction.productIdentifier,
});
await onComplete();
}, [onComplete, posthog]);
const handleDismiss = useCallback(async () => {
posthog.capture("onboarding_paywall_dismissed");
await onComplete();
}, [onComplete, posthog]);
<RevenueCatUI.Paywall
// only works for paywall v1
options={{ displayCloseButton: isDismissible }}
onPurchaseStarted={handlePurchaseStarted}
onPurchaseCompleted={handlePurchaseCompleted}
onDismiss={handleDismiss}
/>
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"