AppStore verifyReceipt returning 21007 in sandbox

I am trying to implement in app purchase for my app. I followed some instructions and got stuck in a problem. It says in the documentation to call the sandbox url if status in the response for calling the production url is 21007. But the problem is that I am getting this status in production and also in sandbox. Is there something I am doing wrong? I tried to find the answer on StackOverflow, even though there are some that sound similar, none of the question was the same as mine. I am running my application on a real device through Xcode.

I am doing a POST to https://sandbox.itunes.apple.com/verifyReceipt
with body:
Code Block json
{
"receipt-data": <on attachment because of size limit>
}


but I receive as response:
Code Block json
{
"status": 21007
}

It is very easy to reproduce using Postman. I get the same response as calling the production url (https://buy.itunes.apple.com/verifyReceipt).

Is there something I am missing? Or maybe it could be a bug?
I am getting same error, on sandbox.
I found another thread of the same topic https://developer.apple.com/forums/thread/675893
AppStore verifyReceipt returning 21007 in sandbox
 
 
Q