Why has the Google Play In-App Billing Purchase object a list of skus?
Asked Answered
L

0

7

I implemented the Google Play Billing API in my Android app.

But I don't understand why a Purchase object doesn't have a single sku but a list of skus? In which case can a Purchase contain more than one sku?

This makes the validation on backend site a little bit akward because I need to iterate over that list of skus and query the Google Play Developer API multiple times with the same PurchaseToken.

Is there any use case in which a single Purchase can contain more than one sku in that list or can I just assume that the list will always contain only a single sku?

Latvia answered 24/4, 2022 at 13:38 Comment(2)
Before version 4 it was a single sku. The documentation and release notes do not give any insight in the reason of the change or what is means. Very frustrating.Noninterference
Seems like a user can pay for several products in one purchase. So you get the list of SKUs for each product. The method is currently deprecated in favor of getProducts() which kind of supports this hypothesis even moreCooking

© 2022 - 2024 — McMap. All rights reserved.