Skip to content

Instantly share code, notes, and snippets.

@filR
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filR/70e0b19d1674e0a70aa6 to your computer and use it in GitHub Desktop.
Save filR/70e0b19d1674e0a70aa6 to your computer and use it in GitHub Desktop.
Validate a iOS Receipt
var request = require('request');
var data = {
'receipt-data': '{ base64 encoded receipt }',
'password': '{secret string from itunes connect}'
}
var verifyURL = 'https://buy.itunes.apple.com/verifyReceipt';
// verifyURL = 'https://sandbox.itunes.apple.com/verifyReceipt';
request.post({ url: verifyURL, json: data }, function(err, res, body) {
console.log(body);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment