I need to implement a back-end for verifying Apple's in-app purchase receipt_data, for an in-app purchase of in-app points (i.e. not a subscription and not an item that needs to be "remembered" and re-verified in every application launch).
I am not proficient in iOS. I just need to develop the back-end so that it can be integrated with a client's mobile app.
I found tutorials and sample code for doing the verification, but I would very much like to have an actual receipt_data to test with.
The best thing would be to have two receipt_datas: one sandbox and one production.
I understand that there two variations of receipt_datas I need to support - one that contains a single purchase's data, and another that contains the full history of purchases. If that's the case, it would be great to have a sample for each...
I realize that this is not a question per se, but maybe sample receipts would be useful for other developers as well...
Here is a deprecated transaction (single transaction) style receipt:
And here is a Grand Unified Receipt (multiple transactions):
Both from sandbox (sorry can't give you any production ones). Enjoy.
Edit: It occurs to me that would won't be able to communicate to Apple's servers with these receipt without my shared secret (not something I am willing to disclose).
However you can decode them, if you're using ruby I wrote a gem called ItunesReceiptDecoder. I also have a gem called ItunesReceiptValidator that also provides the remote calls to Apple.
Sandbox receipt-data:
In-app purchase with name
test2
:Sandbox receipt-data (13 Nov 2018):
Apple validiation response:
Postman validation: https://sandbox.itunes.apple.com/verifyReceipt
Itunes Connect In-App Purchases page: