Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6643783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:05:27+00:00 2026-05-26T00:05:27+00:00

For in-app purchases for iOS we can use an online API for validation ,

  • 0

For in-app purchases for iOS we can use an online API for validation, meaning that we can validate the purchase on our own server.

Is there any way (API) for such validation of in app purchases for OS X?

I’ve found only this snippet about in-app validation for Mac and it seems that Apple doesn’t provide any API for online validation.

Or maybe there is some plan from Apple to support online validation for OS X?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:05:27+00:00Added an answer on May 26, 2026 at 12:05 am

    My app EasyBooks provides an online component that users pay yearly for. It wouldn’t make sense to provide this as a non-consumable type as it only really works as a consumable (however it’s really a non-repeating subscription in iOS). I would like to offer this in-app and I think I have a solution finally…

    I used one of my Apple DTS tickets to query a statement made in the StoreKitGuide document. It says …

    “OS X supports both the server validation method described in this
    chapter and the local validation method…”

    I got a reply from Apple saying …

    “The steps for verifying your In-App Purchase products for Mac
    applications are the same used for iOS applications. The difference is that you will be assigning your base 64 encoded app receipt (rather than the content of the transactionReceipt property) to the receipt-data field. Retrieve the full Mac App Store receipt for your application, then encode it using base64 encoding. Create a JSON object with a single key named receipt-data and assign your encoded receipt to it. Proceed as outlined in the Verifying a Receipt with the App Store section of the In-App Purchase Programming Guide.

    Note: In App Purchases receipt are included in the associated Mac app’s receipt. You must check the receipt associated with your app to verify the validity of the In-App Purchase receipts that it contains. Doing so also allows you to enable the appropriate functionality in your app.”

    So after some failed attempts, I did manage to get this working with the caveat that the receipt data returned by Apple’s servers does not contain the ‘hash of the GUID’ and therefore does not tie the receipt data to any particular hardware.

    This can be tested on your Mac quite easily using these steps:

    1. Find the Mac app receipt file (it’s in your app’s bundle once you’ve run the app and entered your (test) Apple ID and password.

    2. At the command line, base64 -i receipt will base64 encode the receipt with no line breaks (that’s important)

    3. Again at the command line, curl -d '{ "receipt-data": "<your b64 string here>" }' https://sandbox.itunes.apple.com/verifyReceipt

    This returns JSON data in the format

    {"status":0, 
     "environment":"Sandbox", 
     "receipt":{"adam_id":"0", 
                "bundle_id":"uk.co.geode.easybooks", 
                "application_version":"2.2.7", 
                "download_id":"0", 
                "in_app":[ {"quantity":"1", 
                            "product_id":"uk.co.geode.easybooks.syncing",
                            "transaction_id":"1000000034508678",
                            "purchase_date":"2012-09-05 12:00:17 Etc/GMT",
                            "original_transaction_id":"1000000034508678",
                            "original_purchase_date":"2012-01-24 10:16:17 Etc/GMT"} ]}}
    

    I have not confirmed it yet, but apparently (according to the Apple engineer) any consumable types of in-app purchase will be added to the receipt when first purchased, but removed after any further purchases or restore operations. I wonder whether it might be a good idea to make the code running in the app make a copy of the receipt file after each purchase just in case our own servers are down at the time the app tries to validate the receipt. Users may otherwise try to restore purchases, not realising this will remove any consumable product receipts.

    I hope that helps.

    (ORIGINAL COMMENTS FOLLOW)

    I have the same issue. I have an iOS app in the store that has a mix of consumable and non-consumable products that can be purchased in-app. The consumable product is a service, which is fulfilled by my webserver. In the StoreKit delegate method paymentQueue:updatedTransactions:, I use the transactionReceipt property, which is an NSData object. I encode this to base64 and send it to the server. Out on the server I pass the receipt to Apple’s servers for validation.

    But for Mac OS, there is no transactionReceipt property on the SKPaymentTransaction, so we cannot validate receipts in the same way.

    We can do the non-consumable products, which may help you. When an in-app purchase is made on Mac OS, the receipt is updated in the app bundle. It is then possible to parse the receipt file looking for each in-app receipt, which are all stored in the receipt file in the main bundle. For more about that see http://developer.apple.com/library/mac/#releasenotes/General/ValidateAppStoreReceipt/_index.html

    This works fine for me when I use the non-consumable product, but I have one consumable and this is not updated into the app’s receipt file. Without the transactionReceipt property, I don’t see any way for my server to validate that the receipt is genuine. If anyone else has any other experience please let us know!

    Anyone with an Apple developer account can also read about this on the Apple developer forum:
    https://devforums.apple.com/message/548411#548411

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can we use in- App purchase in an iOS App distributed as a enterprise
Is Apple OK with the use of PayPal API in an iOS App, for
In my iOS application, I've 3 products where users can purchase using in-app purchase.
I have an iOS app using In-App-Purchase that caters to an international audience, so
So, I understand that it's possible to set up in-app purchases for iPhone apps
I have an application with In-App Purchase, that when the user buy something, download
I am creating iOS app with in-app purchase feature in it. I created the
We are building a PhoneGap app (both for iOS and Android) that has a
Does In-App Purchase works on an iOS pirated application? Being a developer , I
Android Market app purchases have a 15-min grace period when a customer can cancel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.