Skip to main content
Question

Cordova plugin doesn't fetch subscription item

  • November 15, 2023
  • 1 reply
  • 70 views

Forum|alt.badge.img+2

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([
{
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 🙏

This post has been closed for comments

1 reply

Forum|alt.badge.img+2
  • Author
  • New Member
  • November 17, 2023

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