I am setting up the same application.
The user can purchase the item, it will be tracked on my server and finally consumed, so the user can purchase the same item again.
I keep track of all the purchase information, and I tried to cancel an already consumed order. I can confirm that the status of the order will change (after 10 minutes more or less, you will also receive a letter of cancellation).
Calling this PurchaseAPI URL with your item and a Token purchase will return the purchase information:
https://www.googleapis.com/androidpublisher/v2/applications/<app.package.name>/purchases/products/<productId>/tokens/<purchaseToken>?access_token=<myToken>
The first time you get a similar answer:
{ "kind": "androidpublisher#productPurchase", "purchaseTimeMillis": "1458047931024", "purchaseState": 0, "consumptionState": 1, "developerPayload": "mypurchasetoken" }
and after the cancellation of the purchase, the state will change:
{ "kind": "androidpublisher#productPurchase", "purchaseTimeMillis": "1458047931024", "purchaseState": 1, "consumptionState": 1, "developerPayload": "mypurchasetoken" }
This is the same GET that I do for the first time to test the product.
It is probably wise to set up a periodic check of the status of the purchased goods and, in case of cancellation, update the purchase on the server.
source share