Kamal
Kamal

Reputation: 523

Google Billing Library - Check for Subscription free trial eligibility

I'm new to the implementation of Google's Billing library and using this system to make subscriptions inside my app. My question is if a user created a subscription which has free trial, used it completely and cancelled the subscription. If the user try to subscribe again then will the Google play billing library system handles the free trial eligibility for that particular user or we need to handle it in our code.

Can you please suggest if there is any process to check if the user already availed his free trial? If so, then proceed with charging the user for the subscription trying to subscribe

Upvotes: 7

Views: 2752

Answers (1)

romainsalles
romainsalles

Reputation: 2143

Google will handle it for you: https://developer.android.com/google/play/billing/subscriptions#ft-ip

SkuDetails.getFreeTrialPeriod() returns the free trial period configured in Google Play Console. It's possible the user has already used a free trial. In this case, Google Play communicates to the user that they are ineligible for another free trial.

Upvotes: 2

Related Questions