Question

How can i know the user current subscription

  • 6 September 2023
  • 1 reply
  • 53 views

Badge +2

I want to highlight the current plan(product) on the pricing table by mapping these two:

  1. customerInfo.getActiveSubscriptions()
  2. offerings.getCurrent().getAvailablePackages()

 

but what I  found is that there is no any unikey from them. here is what i got:

  1. customerInfo.getActiveSubscriptions() →  ["pro_plus:monthly"]
  2. offerings.getCurrent().getAvailablePackages() → { "productId":"pro", "basePlanId":"monthly"}

is that  mean i need to combind the key "productId”+”:”+"basePlanId" by myself?or any better way to do that? 

this is the sdk question using java in android.


1 reply

Userlevel 5
Badge +9

Hello,

Another option would be to use the Package.product.id property which should have the product ID and baseplan ID in the same format as what you see on the device. Does that work?

Reply