Skip to main content

Validating Receipts With the App Store

// Load the receipt from the app bundle.
NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
if (!receipt) { /* No local receipt -- handle the error. */ }

/* ... Send the receipt data to your server ... */

For an application purchased from the App Store, use this application bundle property to locate the receipt. This property makes no guarantee about whether there is a file at the URL—only that if a receipt is present, that is its location.

  • Quantity
  • Product Identifier
  • Transaction Identifier
  • Original Transaction Identifier
  • Purchase Date
  • Original Purchase Date
  • Subscription Expiration Date
  • Cancellation Date
  • App Item ID
  • External Version Identifier
  • Web Order Line Item ID

A helper class for verifying App Store receipts under iOS.

Comments