Skip to main content
Question

Cordova plugin doesn't fetch subscription item

  • 15 November 2023
  • 1 reply
  • 50 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 πŸ™

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

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings