Can I test my in app subscriptions when app is only in internal testing track?
I have:
- configured subscriptions
- 2 products each 2 base plans - every plan is active
- license testers
- internal track testers
- have the same build number in internal track as in my Android studio
- I did release build and installed it to my device via
adb - same signing keys
- I can list my subscriptions by providing skus
But unfortunately, I still can't get over the error when doing purchase:
error {
"message": "That item is unavailable.",
"debugMessage": "",
"code": "E_ITEM_UNAVAILABLE",
"responseCode": 4
}
I'm using react-native-iap library and this is my code(simplyfied):
const {subscriptions, currentPurchase, finishTransaction, getSubscriptions, getPurchaseHistory} = useIAP()
const subscribe = async (productId: string, offerToken: string) => {
console.log('product id', productId, 'offertoken', offerToken)
try {
await requestSubscription({
sku: productId,
...(offerToken && {
subscriptionOffers: [{sku: productId, offerToken}],
}),
})
} catch (err: any) {
console.warn(err.code, err.message)
}
}
useEffect(() => {
const subscription = purchaseUpdatedListener((purchase: Purchase) => {
console.log('purchase', JSON.stringify(purchase, null, 2))
})
return () => {
subscription.remove()
}
}, [])
useEffect(() => {
const subscription = purchaseErrorListener((error: PurchaseError) => {
console.log('error', JSON.stringify(error, null, 2))
})
return () => {
subscription.remove()
}
}, [])
const finish = () => {
if (currentPurchase) {
finishTransaction({purchase: currentPurchase, isConsumable: false})
}
}
...
{subscriptions.map((subscription) =>
subscription.subscriptionOfferDetails.map((offer) => (
subscribe(subscription.productId, offer.offerToken)}
>
{subscription.name}
)),
)}
- Do I have to release app to closed testing to be able to proceed with testing?
- Do I have something misconfigured?
Any tips&tricks welcomed🙏🏻