Suddenly receiving error 21002 from verifyReceipt endpoint for sandbox receipt

We started getting error code 21002 from the verifyReceipt endpoint today for any receipt passed to it:

{
    "status": 21002
}

I have created a new sandbox tester, and cleared and reinstalled the application before attempting the purchase. I'm seeing this response through RevenueCat's receipt validation tool (https://www.revenuecat.com/app-store-receipt-validation/) and from a direct cURL command:

curl --location --request POST 'https://sandbox.itunes.apple.com/verifyReceipt' \

--header 'content-type: application/json' \

--data-raw '{

    "receipt-data":"{RECEIPT_DATA}",

    "password":"{SECRET}",

    "exclude-old-transactions":"false"

}'

This was working as of yesterday, but seems to be failing for anyone who has tried today. Has anyone else run into issues with this?

Answered by DTS Engineer in 744422022

There was an outage with the App Store receipt verification that is now resolved. See the status page for details. File a Feedback report if the issue still occurs.

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

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

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

只有沙盒环境 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?

Ok, I tried using Restore Purchase item and it looks like the problem gets resolved (at least in sandbox!) with the help of certificate which is valid until Nov 17 20:40:52 2023 GMT. Looks like we'll have fun right before Thanksgiving day this time.

If someone is willing to check with production, I can provide 1 line of code and a couple terminal commands. Then those of us who had issues with production builds will have a way out... At least for the users who contacted us.

Within the last half hour or so, Apple updated their status page to show the issue as resolved. We're showing purchases that were started yesterday in sandbox as being able to be restored now.

I tried 100 times with the same receipt. It stills shows 21002 (Sandbox) and normal back and forth. tried 100 times but only a few get responses. Any idea?

We're still experiencing this issue in Sandbox. We're POSTing to https://sandbox.itunes.apple.com/verifyReceipt and we consistently get 21002. Production seems okay.

Still getting 21002 even if the status shows the outage was solved. We dont have the app published cause we thought is an error on our side. Go figure. Should I have any hopes the sandbox will work tomorrow? or rather go publish the app and consider the validation is working and they they wil really work after its in production

We are also still seeing this in the sandbox and in testflight builds. However, roughly 10% of purchase+verification attempts are succeeding.

Accepted Answer

There was an outage with the App Store receipt verification that is now resolved. See the status page for details. File a Feedback report if the issue still occurs.

Also still experiencing the issue. I have filed FB11983534.

Hi mate do you recommend using Revenuecat to support in-app subscriptions?I'm new in here, really appreciate it if you could offer some advices, thanks!!!!!

Suddenly receiving error 21002 from verifyReceipt endpoint for sandbox receipt
 
 
Q