4

Recently Google introduces base plans to subscriptions. Base plans are used to introduce different billing period (you end up with single subscription and couple of base plans for example: monthly, weekly, yearly) https://support.google.com/googleplay/android-developer/answer/12154973?hl=en

When I verify subscription on backend I would like to know which base plan user selected but I cannot find any way to get that. Previously I was getting all necessary informations from:

https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions

when Google introduced Base plans they also released purchases.subscriptionsv2:

https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2

but both only returns productId which is subscription id and no base plan id. Any idea how to get that with service account authentication?

On the other hand I can see on Google Play Console under order details productId and selected base plan, so I know subscription is configured correctly

marekk
  • 237
  • 2
  • 11
  • 1
    Did you find a solution? A very strange decision by google – naixx Aug 11 '22 at 08:21
  • @naixx unfortunately not, because we are using monthly and yearly subscription I'm checking start and expire time to set correct type on the backend. I would rather get it from Google, but if thats not possible I see no other option – marekk Sep 15 '22 at 10:22

1 Answers1

1

Google added new field offerDetails with basePlanId, offerId and offerTags into lineItems (https://developer.android.com/google/play/billing/compatibility#subscriptionpurchasev2-fields). Fields not documented yet in https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2, but already come in response.

  • Thank you! I solved that by requesting this information from mobile when user buys subscription and checking purchase and expire time, but that was far from perfect. With this it will be as it should from the start – marekk Nov 22 '22 at 19:09