Reputation: 1449
Why Google does this?
Currently, the com.android.billingclient.api.Purchase
object obtained through the Google Billing API does not include specific details about whether a purchase was made using a promo code or without it.
In the onPurchasesUpdated()
callback, which is triggered when a user initiates a payment flow to subscribe, the Purchase object provides valuable information about the transaction, but it lacks the specific indication of the promo code used.
override fun onPurchasesUpdated(
billingResult: BillingResult,
purchases: MutableList<Purchase>?
)
Upvotes: 1
Views: 90
Reputation: 1934
For some reason, certain information isn't available on the client side. However, you can retrieve this information, along with other data not accessible in the Billing Library, from the Google Play Developer API, both for one-time purchases and subscriptions
Upvotes: 1