For questions concerning the validation of iOS in-app purchase receipts against Apple servers, a recommended means of app billing fraud protection.
Questions tagged [receipt-validation]
212 questions
73
votes
5 answers
Service account doesn't show up in Google Play Console after creation
From my Google Play console I linked a project. Then I created a service account. Still, when refreshing the console, it still says "There are no service accounts associated with your project."
Waited over 24 hours already. The purpose of all that…

GuyC
- 999
- 1
- 8
- 15
27
votes
3 answers
Apple receipt_data sample
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…

obe
- 7,378
- 5
- 31
- 40
25
votes
4 answers
iOS test App Receipt Validation
There is a lot of example about how to test in-app purchase receipt validation by using a sandbox tester account.
But how is the Receipt for the paid App itself? How can we get the App Receipt in development environment?
There is two thing I want…

King Chan
- 4,212
- 10
- 46
- 78
23
votes
2 answers
Apple In-app purchase transaction_id of one purchase changes sometimes
Once I get a receipt from client and validate it by apple server, then I got a transaction id of the new purchase (it's an auto-subscription purchase) in this receipt. After a few days , I get a new receipt from the same client and validate it ,…

PE Xie
- 383
- 3
- 9
21
votes
5 answers
iOS 7 Local (on device) Receipt Validation and In-App Purchases Check
I have implemented receipt validation locally on the device using OpenSSL and the asn1c compiler with help from Apple's Receipt Validation Programming Guide. My app only supports iOS 7 and up.
As recommended by Apple I call, [[NSBundle mainBundle]…

Anuj Seth
- 673
- 6
- 15
19
votes
4 answers
Understanding receipt validation and receipt refreshing in iOS
We have issues fully understanding the receipt validation flow in iOS.
Here is what we currently do (in development):
In applicationDidFinishLaunching and in applicationWillEnterForeground we validate the receipt on the server side, if there is no…

the_critic
- 12,720
- 19
- 67
- 115
18
votes
2 answers
Detect if a user refunded a 'consumable' in app purchase item (Apple app store in app purchase system)
I read so far online that the only way to detect if a user cancelled an in app purchase is by using the receipt data that I get from the user's iPhone and check if the cancellation_date exists in there for that item, but as far as I know, this field…

Revo
- 530
- 7
- 14
17
votes
5 answers
Is it necessary to validate / refresh an app store receipt on launch in iOS?
The Apple docs on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by [[NSBundle mainBundle] appStoreRecieptURL], refreshing via SKReceiptRefreshRequest if it's not…

Tom Hamming
- 10,577
- 11
- 71
- 145
16
votes
4 answers
Where to find the shared secret for iOS App Store receipt validation?
I am confused on where to find the shared secret needed to verify regular In-App purchases.
About one year ago I have created a server script which is call from my iOS app to verify the App Store receipt with Apples .../verifyReceipt endpoint.
This…

Andrei Herford
- 17,570
- 19
- 91
- 225
15
votes
1 answer
iOS auto-renewable subscriptions: receipt validation flows
I'm implementing an auto-renewable subscription scenario, where the receipt validation will be handled by my server-side code. Following Apple's documentation, I'll be obtaining the receipt data from NSBundle, and pass that data to my server, which…

Rui
- 5,900
- 10
- 38
- 56
12
votes
1 answer
iOS in app purchase receipt with different itunes user
I am using receipt validation locally on device and targeting iOS 7+
I am testing auto renew subscription in app purchase in the sandbox environment and I noticed this scenario.
-User A is signed in iTunes account on device, purchases subscription…

Dev_Sand
- 131
- 4
11
votes
0 answers
App Store receipt validation: How to check if entire paid app was refunded (not in-app purchase)?
Suppose a customer bought my paid app in the Mac App Store, and then asked Apple and was issued a refund. Does Apple somehow invalidates the receipt to render the app impossible to use any longer? And if so, is there some kind of flag in the receipt…

user1548418
- 457
- 4
- 14
10
votes
1 answer
How to get the original_application_version (the first purchased version number) out of iOS Receipt in iOS 11?
I have a paid iOS App.
I need to get the original_application_version number (the first version purchased by the user) from the Apple AppStore Receipt.
To get the receipt, when my app loads, I use checkReceiptFromAppStore() function:
func…

Adelmaer
- 2,209
- 3
- 22
- 45
9
votes
1 answer
iOS App Receipt Validation - Receipt is missing in simulator and on device while debugging
Why would my app lack an Receipt while in development?
I am running my iOS (7, 8, 9) app from Xcode 7.3.1. The app’s Receipt seems to be missing. This app is currently shipping in the App Store, so I have my developer credentials, and a “sandbox”…

Basil Bourque
- 303,325
- 100
- 852
- 1,154
9
votes
6 answers
IOS receipt validation error 21002
I'm trying to use receipt validation with my server side. Everything is ok, but sometimes I see strange: 10 times validation is OK, but on 11 i get 21002 error. I dont know what to do. Sometimes I get error 21002 when I validate receipt first time…

John Snow
- 129
- 1
- 3
- 7