As already mentioned, validation validation is only built into the Parse SDK for downloadable content, but it’s quite simple to create a cloud-based code function that sends a request to the application in the iTunes Store for verification. Here are the Apple docs for server-side validation : Checking checks using the App Store
Here's what the main function looks like:
Parse.Cloud.define('validateReceipt', function (request, response) { var receiptAsBase64EncodedString = request.params.receiptData; var postData = { method: 'POST', url: 'http://buy.itunes.apple.com/verifyReceipt', body: { 'receipt-data': receiptAsBase64EncodedString, 'password': SHARED_SECRET } } Parse.Cloud.httpRequest(postData).then(function (httpResponse) {
For more information on interpreting a JSON receipt, see Receive Fields . It's pretty simple for iOS 7+, but automatically updating subscription receipts for iOS 6 and earlier is tedious.
source share