-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Free trial state identification in subscriptionV2 response #585
Comments
Perhaps
|
@matale it returns freetrial in offerId even after conversion of trial. So not able to trust this.
|
Any updates on the above? |
Also interested in this. We reverted to using the old API just to get this data. |
Same why would they remove such a valuable information ? |
Also waiting for any progress here. Would continue using the old API until then as suggested by @liquidsnk |
This was already an issue with the V1 api for offers that weren't free trials. It would have been nice to have offer state for a subscription in the subscriptionv2/get endpoint but I guess it is too late for that now. What we are going to do instead is have all the offer configurations in our DB and implement our own logic to To Google: Please properly document this feature so developers understand what they need to do on their side to know the current state of an offer for a subscription. The current documentation is not sufficient. Edit: Apple's subscription API takes the other approach, where the offer details are only present in the response for the current active subscription if the offer is currently in effect. It could be argued that the downside there is you need to do more checking to know what offer the subscription was purchased with originally, but in practice this is easier to know than whether an offer is still in effect for a subscription at the moment the details were fetched. |
Do we have any idea when will the subscriptions v1 GET endpoint completely stop working? I can see that for now it is working and exists for backwards compatibility. |
No, V1 had a clear payement state free trial. |
it's very unclear, but the v2 only has the get. It doesn't have cancel/refund/revoke/defer. So it would be strange to fully remove v1. |
@julienlurois My bad, I meant only the GET endpoint for subscriptions v1. Just edited the comment. |
any update on this? |
I found this solution on Stackoverflow. Please refer this link |
@nhanlethanh1198 - As I mentioned before, we tried to use that but the problem is the offerId with freetrial still present even after the renewal. It may be bug in the playstore and so far it was not fixed. We can't trust this for freetrial. {"acknowledgementState":"ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED","kind":"androidpublisher#subscriptionPurchaseV2","latestOrderId":"GPA.xxxx-xxxx-xxxx-xxxxx..0","lineItems":[{"autoRenewingPlan":{"autoRenewEnabled":true},"expiryTime":"2024-08-28T03:31:06.117Z","offerDetails":{"basePlanId":"p1y","offerId":"freetrial"},"productId":"xxxxxxxxxx"}],"regionCode":"US","startTime":"2023-08-14T03:32:04.885Z","subscriptionState":"SUBSCRIPTION_STATE_ACTIVE"} |
Haven't tested this yet, but a possible solution might be to query the offers endpoint with the |
Yes - this is why I specified that it was an issue in V1 for offers that weren't free trials. For offers that were free trials, it was lovely, we were able to easily know that the free-trial offer was currently in effect 😃 For other offers that were not free trials, it was the same as V2 is now, except now you can't know the current state of any offer type, including free trials. Except if you...
This is what we're doing (well, not from the endpoint, we just hardcode it in the DB and update it when we change it 😛 ). As I said before, it's not ideal but it's all we can do. |
After conducting in-depth research and testing on this issue, we found the meaning of Given one subscription whose productId is When this user cancels the subscription on 10/10/2023, the whole subscription purchase period is done. However, this user repurchased the same subscription several days later on 10/15/2023. The transaction id of this new purchase is We know the free trial does NOT take effect in the second purchase, so the value of Based on the above, both the value of |
This is a clever workaround! However, it highlights that this is a problem in the API, if developers are forced to check for ".." in the transaction ID along with the (non-)existence of another field which is not technically for this purpose. |
how to detect |
Any news on this? We wanted to update our integration to use the V2 API instead of V1 and we need to know the state of the free trial. The workaround mentioned above might work, but as @pnico said above, it doesn't sound like a really sustainable way to go. |
I m also facing the same issue upgrade subscriptionv1 to subscriptionv2 but the free trail is not working and payment state is not free trail state |
Our app using the paymentState for identifying the receipt is in free trial or not. Now we are moving to latest API subscriptionV2(https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get). But there is no field to identify that it's free trial. Could someone share me the details.
The text was updated successfully, but these errors were encountered: