Reputation: 27653
Out of Apple's status codes for an in-app purchase (in Table 2-1 here), some should obviously be tried again, and some not and should be considered to say that the receipt in invalid.
But what about "21003 - The receipt could not be authenticated."? Is it similar to 21010 or to 21005? I.e. should this be sent again later or considered an invalid purchase?
Upvotes: 12
Views: 5954
Reputation: 2333
In my experience, if the shared secret created is brand new, you may need to wait a few hours for it to work properly. I did not find anything in the documentation about this, but I have experienced it many times.
Upvotes: 3
Reputation: 286
From my experience, the "21003 - The receipt could not be authenticated."
status is related to the App-Specific Shared Secret.
When you validate receipts with the AppStore, the App-Specific Shared Secret is used to set the value of the password
field in the JSON request that you sent to the AppStore validation endpoint. (See Validating Receipts with the App Store documentation)
Keep in mind that according to Apple's documentation, this apps-specific shared secret is only necessary when validating receipt for apps that use auto-renewable subscriptions. However, in my experience, it might be worth setting it for any app receipt validation, just to avoid the 21003 error.
Upvotes: 17