Skip to main content

Hey guys, I can’t see to retrieve subscription-based products, however consumables work. Here is my code:

import 'cordova-plugin-purchase';

const { store, LogLevel, Platform, ProductType } = CdvPurchase;

await store.register(r
{
id: 'monthly',
platform: Platform.GOOGLE_PLAY,
type: ProductType.PAID_SUBSCRIPTION
},
{
id: 'trimonthly',
platform: Platform.GOOGLE_PLAY,
type: ProductType.PAID_SUBSCRIPTION
},
{
id: 'semiannually',
platform: Platform.GOOGLE_PLAY,
type: ProductType.PAID_SUBSCRIPTION
}
]);

console.log(store.products); // /]

 

Screenshot:

 

Help is much appreciated 🙏

Fixed, id should be the subscription ID and not offer ID.


Reply