Is there a way to see if a user has already had a free trial?

We offer a free trial period on our in-app subscriptions. Some users sign up for the free trial, then cancel. After some time, they may decide they want to subscribe again. Is there a way, programmatically, (either from within the App or via some API such as the is used to verify receipts) to see if the user has already consumed the free trial or not?

I want to avoid showing messaging to the customer that they can get a free trial if they have already used it (because the App store will charge them immediately if the free trial has already been used).
Is there a way to see if a user has already had a free trial?
 
 
Q