[ADAPTY] Error: #2009 (encodingFailed): Failed to find encoder for property "0"
complete
C
CHOI HYOUNG BIN
try {
const id = 'hoxy_weekly_2';
const locale = 'en';
const paywall = await adapty.getPaywall(id, locale);
await adapty.logShowPaywall(paywall);
const product = await adapty.getPaywallProducts(paywall);
console.log(JSON.stringify(product));
try {
console.log('[ADAPTY] Purchasing product: ', product);
await adapty.makePurchase(product);
console.log('[ADAPTY] Purchase successful');
} catch (error) {
console.log('[ADAPTY] Error:', error.message);
if (error instanceof AdaptyError) {
Alert.alert(
Error purchasing product #${error.adaptyCode}
,error.localizedDescription,
);
}
}
Activity Feed
Sort by

Adapty Support
complete
A
Adapty Support
Hi there!
As far as I can see, you have product = await adapty.getPaywallProducts
getPaywallProducts returns a list of products
Accordingly it should be, for example:
const products = await adapty.getPaywallProducts(paywall); await adapty.makePurchase(products[1]);
Hope that helps!