Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 21007: status result returned by Apple during in-app subscription restore

We are testing 'restore subscription' using Apple's new in-app subscription model. The In App Purchase Programming Guide lists 6 status codes that are returned by the Apple server during the restoration/purchase process ("Verifying an Auto-renewable receipt" - page 33/34). However, the errors start at 21000 and end at 21006. We just tried to restore a subscription and received a status result of 21007. I have googled this error and am not finding any information about what this status result means. Thank you in advance ....


Error 21008 is also another Error response that Apple returns if you point to the wrong production/sandbox server.

like image 230
Miriam P. Raphael Avatar asked May 17 '11 15:05

Miriam P. Raphael


3 Answers

Do not point your script to the live Apple server when you're testing using the sandbox(!)

Lesson learned. Hope this post helps someone else.

like image 65
Miriam P. Raphael Avatar answered Nov 13 '22 13:11

Miriam P. Raphael


I just returned from iOS 5 Tech Talk World Tour 2011 and the Apple Tech in the In App Purchase session said that the app review process uses the sandbox when reviewing a submitted app and that they would appreciate it if we would check for this error code and forward the request to the sandbox if we get this error code.

Error code 21008 was the same issue but for a different IAP. i.e. consumable versus non-consumable. I assume the same goes for that code as well. i.e. to forward to the sandbox if received.

Sounds like this might speed up the review process a little.

From Validating Receipts with the App Store:

Verify your receipt first with the production URL; then verify with the sandbox URL if you receive a 21007 status code. This approach ensures you do not have to switch between URLs while your application is tested, reviewed by App Review, or live in the App Store.

like image 31
zaphodtx Avatar answered Nov 13 '22 15:11

zaphodtx


I know that this is late but I figured anyone else come across this question, they would like to know what the proper URL to use.

You should use the: https://sandbox.itunes.apple.com/verifyReceipt URL to test with the sandbox.

like image 8
KoboldAtWork Avatar answered Nov 13 '22 15:11

KoboldAtWork