Apple Doc:

https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html 

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html

 

Verify Method:

curl 'https://sandbox.itunes.apple.com/verifyReceipt' -d'{"receipt-data”:”xxxxxx”, "password":"xxxxxx"}'