iosapp-storein-app-purchase

How to verify ios In-App Purchase on your server


I am up to build my first in-app purchase app. I would like to know whether there is a way to verify purchase on your server.

I have to build the whole user management, and I would like to know for all registered user what they already bought on their iOS devices, so that they get web app for free, or something like that. So, is there a way for me to check on Apple store side, if this user has already buy some product?

EDIT:

Scenario is like this:

User A buy app B on mobile device. After this I would like to check on my server (on my web page,...) if user A is bought app B, or (similar) which app was bought by user A.

I don't want to send message from mobile device to my server that user A buy app B, because users can reproduce this call on server even if they didn't buy app B.

I would check on server side whit app Store if user A bought app B.


Solution

  • Fetch the app's receipt (from the file at [[NSBundle mainBundle] appStoreReceiptURL]) and send it to your server. Then either…