Does my Android app subscription subscription term increase with every monthly update?

I am implementing an application that will have an in-app purchase subscription. Subscription is updated monthly. When a user buys a subscription, they get a free 30-day trial. I understand that I have access to the purchaseDate value from the returned JSON, however I have a few questions about this:

When subscription renews, is the purchase Time / purchaseDate updated to the renewal date / time? Or does the original purchase date always remain?

I am trying to find the best way to cache this locally in the application, so that I only get getPurchases checked a couple of times a month during the update, are there any good examples or best practices that I could use to follow?

Please do not respond by posting a link with the documentation. I know where to find it and have already read it :)

+6
source share
2 answers

The getPurchases () method mentioned here only pulls purchases without buying back. Therefore, if your application notifies that the user has no purchase (no purchases are returned from "getPurchases ()", but they have purchase information (has_purchase, purchase_token, etc.) in your application database, then you found expired buy, so delete all purchase information in the database for this user.

Hope this helps.

0
source

Here is my current hunch about this, I also could not find a good document.

I believe that the simple answer is that the purchase date is the date of the original purchase, not the renewal date.

In other words, if the subscription began on March 1 and you receive purchases in July, the purchase date will still be March 1, although there have been several renewals.

You can say that the subscription is active using getPurchaseState () = "0" ("Purchased"), "1" = "Canceled", "2" = Returned.

To find out the expiration date, use Day of the month from the date of purchase and find the next occurrence of that Day of the month. For example, if today is July 15th and getPurchaseState () = "0", then the expiration date should be August 1st.

All of the above is a bit of a hunch. I wish I also found a good document.

-1
source

Source: https://habr.com/ru/post/975256/


All Articles