You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2026. It is now read-only.
For both iOS and android im facing an issue where sometimes onPurchaseSuccess isnt triggered after a successful purchase of both IAP and Subscriptions.
Im relying on this for validation.
It seems that even after using getAvailablePurchases those purchases arent available in the list.
But users get message item already owned for IAP and for subscription they get an email that the dev (me) never acknowledged their purchase and that they will be refunded.
One user the ack happened 2-3 days later.
The number of users with this issue i estimate is 20%
This logic is ran on a root component, requestPurchase is done by individual Screens
Would love some help
const {
connected,
subscriptions,
products,
fetchProducts,
initConnectionError,
} = useIAP({
onPurchaseSuccess: async purchase => {
await validatePurchase(purchase); // this validates and finishes, i have tracking in the flow, doesnt get called sometimes
},
onPurchaseError: error => {
handleError(error, true);
},
});
useEffect(() => {
if (!connected || hasProcessedPendingOnConnectRef.current) {
return;
}
hasProcessedPendingOnConnectRef.current = true;
const processPendingPurchases = async () => {
try {
const purchases = await getAvailablePurchases({
alsoPublishToEventListenerIOS: false,
onlyIncludeActiveItemsIOS: false,
});
if (!purchases?.length) {
return;
}
for (const purchase of purchases) {
if (
Helpers.isSubscriptionPurchase(purchase) ||
Helpers.isAvatarPurchase(purchase) ||
Helpers.isVideoPurchase(purchase)
) {
await validatePurchase(purchase);
}
}
} catch (error) {
handleError(error, true);
}
};
const timeoutId = setTimeout(processPendingPurchases, 1500);
return () => clearTimeout(timeoutId);
}, [connected, validatePurchase]);
Hi,
For both iOS and android im facing an issue where sometimes onPurchaseSuccess isnt triggered after a successful purchase of both IAP and Subscriptions.
Im relying on this for validation.
It seems that even after using
getAvailablePurchasesthose purchases arent available in the list.But users get message item already owned for IAP and for subscription they get an email that the dev (me) never acknowledged their purchase and that they will be refunded.
One user the ack happened 2-3 days later.
The number of users with this issue i estimate is 20%
This logic is ran on a root component, requestPurchase is done by individual Screens
Would love some help