I have to implement Google In App susbscription in my app. In server side, I want to validate subscription status of user. The response of subscription is as follow
{
"kind": "androidpublisher#subscriptionPurchase",
"startTimeMillis": long,
"expiryTimeMillis": long,
"autoRenewing": boolean,
"priceCurrencyCode": string,
"priceAmountMicros": long,
"countryCode": string,
"developerPayload": string,
"paymentState": integer,
"cancelReason": integer,
"userCancellationTimeMillis": long,
"orderId": string
}
Google has api to validate subscription status. Its response is as follow.
{
"kind": "androidpublisher#subscriptionPurchase",
"startTimeMillis": long,
"expiryTimeMillis": long,
"autoRenewing": boolean,
"priceCurrencyCode": string,
"priceAmountMicros": long,
"countryCode": string,
"developerPayload": string,
"paymentState": integer,
"cancelReason": integer,
"userCancellationTimeMillis": long,
"orderId": string
}
I want to check user subscription status by using this API. The question I want to ask how will I know that user subscription has been renewed by this response. If user get subscription for one month and after one month, subscription will be renewed automatically. I have receipt for old subscription in my database and I will be using same OrderId to check subscription status. How will I new that subscription has been renewed for that particular orderId.