Suddenly receiving error 21002 from verifyReceipt endpoint for sandbox receipt

  • +1 we face the same issue starting from yesterday. all receipts verified against sandbox return error 21002

Add a Comment

Apple Recommended

  • We are still getting 21002s. When curling the endpoint multiple times it will succeed once out of approximately every 10 requests.

  • We're still experiencing this issue. I have filed FB11984721 (App Store Sandbox Receipt Verification).

  • Also still experiencing the issue. I have filed FB11983534.

Replies

I am also running into the same issue and it started occurring sometime this morning.

Yes, we are seeing the same symptoms over here.

  • Everything was fine a few days ago.
  • We didn't change anything
  • Same error (21002) from RevenueCat's tool
  • Painstakingly bypassed any of our server-side or javascript code that is in any way involved.

The status page now shows an outage for Receipt Verification - https://developer.apple.com/system-status/. Hopefully this will be resolved soon.

Yes I am also facing the same issue since multiple hours now, should be an Apple problem, hope they will fix it soon

My team is hitting the exact same problem sandbox receipts as of today are returning as malformed data - worked fine in testing yesterday it seems like there must be some issue with the IAP system?

Running into the same issue as well using both curl and our server receipt verification we get the 21002 response from https://sandbox.itunes.apple.com/verifyReceipt

Yeah we are facing the same issue as well. It works in the App Store build but TestFlight and sandbox are failing

me too , env = sandbox , 21002

+1. I hope Apple's official developers can answer this problem.

Facing the same issue, Apple is aware of it and is reporting it as an outage in the System Statuses for developers

It is probably connected to Upcoming changes to the App Store receipt signing certificate

Ok, I took a receipt from Sandbox environment and extracted the certificates used to sign it. The last cert was Apple Root certificate, but the first 2 were the already expired intermediate certificates. Anything signed with those MUST fail after February 7. The part with "Not After : Feb 7 21:48:47 2023 GMT"

Certificate:
  Signature Algorithm: sha1WithRSAEncryption
    Issuer: C=US, O=Apple Inc., OU=Apple Worldwide Developer Relations, CN=Apple Worldwide Developer Relations Certification Authority
    Validity
      Not Before: Nov 13 02:15:09 2015 GMT
      Not After : Feb 7 21:48:47 2023 GMT
    Subject: CN=Mac App Store and iTunes Store Receipt Signing, OU=Apple Worldwide Developer Relations, O=Apple Inc., C=US

____________________

Certificate:
  Signature Algorithm: sha1WithRSAEncryption
    Issuer: C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Apple Root CA
    Validity
      Not Before: Feb 7 21:48:47 2013 GMT
      Not After : Feb 7 21:48:47 2023 GMT
    Subject: C=US, O=Apple Inc., OU=Apple Worldwide Developer Relations, CN=Apple Worldwide Developer Relations Certification Authority

____________________

Certificate:
  Signature Algorithm: sha1WithRSAEncryption
    Issuer: C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Apple Root CA
    Validity
      Not Before: Apr 25 21:40:36 2006 GMT
      Not After : Feb 9 21:40:36 2035 GMT
    Subject: C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Apple Root CA
  • All my IAPs in the official/non-sandbox version stopped working as well. Also those that do no use an online Apple server check, so I assume the digital receipt already contained those certificates that expire.

  • Mine too - I had on-device verification of the chain to Apple Root CA. I did not check production myself, but someone wrote that one was different - it simply did not have a signature instead of expired one. So, if you did everything right and actually checked the certificates chain to root, you were stuck either way.

    Thank you Apple. What is the point of warning us to not depend on soon-to-be-changed intermediate certificates, if you actually did it not the way you described? :-(

Add a Comment

只有沙盒环境 21002

Today I discovered that purchases were broken in one application: Response from appstore for transactionId '2000000***' : {"status":21002}

In other app purchases still work. Is this an Apple problem?

Can you explain the process of taking a receipt from the sandbox and extracting the cert?

  • I used an Internet article How to Validate iOS In-App Purchase Receipts Locally from https://medium.com/better-programming (I am not affiliated with it in any way.) It shows how to get the receipt (I used string input to XCode console), save it and extract the file receipt.pkcs7.certs. I opened that file with an editor and there were 3 certificates there. I divided it into 3 files, then ran command openssl x509 -in receipt.pkcs7.cert1 -text -noout for each one.

  • verifyReceipt has recovered. This restored our ability to purchase in the sandbox. It's still sporadic, so it may take a bit to clear up completely.

Add a Comment