Google api validate purchasetokens verify receipt

23 views Asked by At

I have a question about purchase token validation with the google api. So far I send the purchasetoken from the client to my backend and validate it together with the product sku, but how can I validate the amount of the purchased product?

enter image description here

After allowing multiple purchases for the same product, how can I validate the amount together with the purchasetoken and product sku? This is the code that validates only purchasetoken and product sku that I use:

purchases = service.purchases()
subscriptions = purchases.subscriptions()
subscriptions_get = subscriptions.get(
    packageName=self.bundle_id, subscriptionId=product_sku, token=purchase_token
)
result = subscriptions_get.execute(http=self.http)
return result
0

There are 0 answers