Always returning status 21004

In sandbox envirnoment, after making an auto-renewing subscription, all calls to: https://sandbox.itunes.apple.com/verifyReceipt Always returns:

{

environment = Sandbox;

status = 21004;

}

This error is meant to mean that the password sent with the request in wrong.

I am sending both the "receipt-data", and the "password". And I have checked a million times that the "password" matches the shared secret in iTunes Connect.

This same call works fine when validating a receipt before an anto-renewing subscription has been purchased.

So I am just wondering if this is a current issue on Apple's end, and if anyone else is experiencing the same problem?

Answered by in 213798022

I was just informed that this problem has been fixed. I then used a sample receipt provided in a recent bug report, and the receipt validated in the sandbox and presented the info on the auto-renewing subscriptions


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Great ! I can now "decode" my old receipt with the password key. It seems to work. No more 21004 error.

I will make more test at work


Thanks Rich for taking time updating this case !

UPDATE: After stucking on receipt validation for the past 4 days, my updated shared secret finally reflected in iTunes connect system. i think they have somehow fixed the issue.

I'm still facing the same problem in sandbox mode. I'm unable to do autorenewable subscriptions or even the consumable products.

Any idea?

Hello Alizahr,


If you are still seeing this issue, please file a bug report as described above.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

I see the same behaviour. Once I sent 'AutoRenewable Subscription' - I got status 21004.


All other tries Consumable and non - got the same error 21004

For today I use different sandbox tester email to at least get rif of 21004 error and check other items except auto-renew-Subscr

Opened ticket 31317931


Details:


Maxim Shoustin29-Mar-2017 12:15 PM

Apple ID of the App: Apple ID of the User: maxim@appsflyer.com

Summary: Once you try to validate auto renew subscription with Sandbox, any attempt to validate another purchase after will fail with the 21004 error! Even if that purchase is the one that worked before like a regular consumable. The workaround is to use different Sandbox Tester email


Steps to Reproduce:

- Purchase Auto Renewable Subscription without secret

- Purchase non Auto Renewable Subscription like Consumable


Expected Results:

- Purchase Auto Renewable Subscription without secret

get back status 21004

- Purchase non Auto Renewable Subscription like Consumable

get back status validated TRUE


Actual Results:

- Purchase Auto Renewable Subscription without secret

get back status 21004

- Purchase non Auto Renewable Subscription like Consumable

still get back status 21004


Version: iOS


Notes: Configuration: client iOS 10.3 - Receipt validation by server side (Clojure)

I'd like to clarify your finding. You stated in the steps to reproduce


1 - Purchase Auto Renewable Subscription without secret

I think you mean - purchase an Auto Renewable Subscription item, then on successful purchase validate the applicationReceipt without passing in the shared secret. This should result in status 21004 - which is expected.


The next step -

2 Purchase non Auto Renewable Subscription like Consumable


Which I think you mean - purchase a consumable (or any other item, but not an Auto Renewable Subscription item). Then attempt to validate the applicationReceipt without passing in the shared secret.


For the second case, I would expect status result 21004 - keep in mind, the applicationReceipt should now include in the in_app array, the Auto Renewable Subscription item, as well as the second item (which is not an Auto Renewable Subscription item). Anytime the applicationReceipt has even one Auto Renewable Subscription item in the in_app array, the shared-secret must be included for the receipt to be validated. Status 21004 correctly indicates that there is an Auto Renewable Subscription item in the applicationReceipt and the shared-secret is either incorrect or missing.


If however, the in_app array does not contain an Auto Renewable Subscription item, and status 21004 is returned - that would be a bug report issue. What happens if you inciude the shared-secret in the validation attempt?


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Until today, everything was fine. But now https://sandbox.itunes.apple.com/verifyReceipt returns only status:21004. All of our products are consumable. There is no auto-renewing subscription. Is there any issue on the sandbox servers?

Reported the issue to https://bugreport.apple.com/.

I'm seeing this same issue reported to DTS - here's what needs to go in a bug report for this specific issue

1. Log into the Apple Developer Bug Report web page - http://bugreport.apple.com

2. Create a new bug report under the component “iTunesConnect”

3. In the bug report, include the following items

3a. the application ID

3b. a base64 encoded applicationReceipt which can be sent to the sandbox verifyReceipt server to demonstrate this problem.

Indicate that the app offers no auto-renewing subscription iAP purchase items.


Please send me the bug report number and I will forward the issue to the Apps Ops Engineering QA team. When you do so, make sure to indicate this is the issue where status 21004 is being returned on the validation of an applicationReceipt which has no auto-renewing subscription iAP items.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Hello Rich,


I am having same issue. Bug ID : 32534121

Pleaes help me out as I need to release the build.

Regards,

Yogesh

Faced same problem now. All test purchases has worked fine until I made test subcription purchase. For now I alway get 21004 status code for all purchases. And more, I can not unsubcribe, cause I cannot see "Subscriptions" menu on my phone. Seems my acount became broken until fix.

Make sure you added "password":"<YOURSHAREDSECRET>" to the receipt. You may get "21004 - The shared secret you provided does not match the shared secret on file for your account." because there is no password added.

Always returning status 21004
 
 
Q