21007 Status Code being returned by Sandbox Verify Receipt Endpoint

We have an issue with validating in-app purchases which just seemed to start occurring today. When you send a sandbox receipt to the production endpoint (https://buy.itunes.apple.com/verifyReceipt), it returns the status code 21007 with the message.

This receipt is from the test environment, but it was sent to the production environment for verification.

This is documented here:
https://developer.apple.com/documentation/appstorereceipts/status

It is then advised to attempt this receipt on the sandbox endpoint (https://sandbox.itunes.apple.com/verifyReceipt) due to the status code returned.

We have used this successfully for about a year now. We check the status code and if it is 21007, we then try the sandbox endpoint. As of today, we started seeing that the sandbox endpoint is returning a 21007 status code which does not make sense and threw our API into a recursive loop since it kept seeing that status and kept trying the sandbox endpoint. This status code is clearly wrong as it was not 'sent to the production environment' in these cases and this status code has never been returned in the past from the sandbox endpoint.

Is this a bug introduced by Apple as of today or has something changed that I have not seen the documentation for?
Answered by i Jana in 666503022
it's working now
Accepted Answer
it's working now

Today (18jun 2021) the same error?

I am using the same subscription logic implementation as in another prod app and now I am developing new app and facing the problem as mentioned there. The receipt is sent to prod verify endpoint, I can't figure out what can be wrong.

I got this result status when trying to verify a SANDBOX transaction with the PROD environment URL.

21007 Status Code being returned by Sandbox Verify Receipt Endpoint
 
 
Q