Auto-Renewable Subscription Error(21004) for consumable IAP during Apple Receipt Validation.We are using sandbox environment and this was working fine and tested.

We are using sandbox environment and this was working fine and tested.Suddenly it started to give this error.

Accepted Reply

Thanks Rich for the support.


We analysed the request from the web server.For consumable items,we were sending password parameter with empty string value to https://sandbox.itunes.apple.com/verifyReceipt end point.This request was working fine previously.


Now in order to make it work,we need to remove password parameter for consumable items to the https://sandbox.itunes.apple.com/verifyReceipt end point.


Hope this change will fix this issue for others also.

Replies

Is there an autorenewable subscription in your app?

No.We are only using consumable In app purchases.This was working fine previously.

If it was working, but now it's not, this is a bug report issue against the App Store verifyReceipt server. Capture the base64 encoded appStoreReceipt contents to a text file and submit it with a bug report.


If the string is found, save the entire contents of the console log to a text file.


To submit a bug report, please use the Apple Developer Feedback web page -

<https://feedbackassistant.apple.com/>.


Enter the “Feedback Assistant” page and login

Click on the Compose icon to start a new bug report


Start by clicking on the appropriate OS button - “iOS and iPadOS”, “tvOS”, or “macOS”

1. In the “Descriptive Title” field, enter an appropriate title

2. In the “Problem Area” field select “StoreKit”

3. In the “Type of Feedback” select “Incorrect / Unexpected Behavior”

4. In the “Describe the Issue” section enter the following

- application ID (and In-App Purchase identifier for the purchased item

- sandbox or production environment


5. the base64 encoded appStoreReceipt content in text file - drop it onto the “Drop Files to upload”.


Post the Feedback number - FBxxxxxxxxxx and I'll review the issue - and notify App Store Server QA


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Thanks for the reply.Given below is feedback number.


FB7468839

Is it possible that someone accidently added an autorenewable subscription to the app on App Store Connect - not in the app?

I reviewed the bug report - there's no application ID - please update the bug report to include the app id. I was going to verify that there's no auto-renewing subscription offered by your app - as PBK asked.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Thanks Rich for the updates.


Please find the Apple ID for the application.Updated the same under bug report.No there is no auto-renewing subscription offered by the application.


Apple ID : 1392218044

Hi there,


I'm getting the same problem with sandbox consumable IAP purchases and so is our whole QA team.


We do not have any subscriptions of any kind.


This was working just a few weeks ago.


Mike Page

>This was working just a few weeks ago.


Did you sign out of iCloud and sign back in to confirm it's not so much on your end?


If so, and you're still having issues, and since you're not so much alone in this one, file a bug, being sure to add your FB number to your comment for reference, thanks and good luck.

Hi Rich,


Jut wondering if there's any word on this being an official issue?


We're trying to gold a release for Christmas and this problem means we can't test any IAP in sandbox.


Thanks


Mike.

Hi Rich,


Is there any workaround for this issue?.Will this IAP will work in production environment?.

Still waiting for a solution for this issue .


Thanks

The same issue we faced: Error(21004) on receipt validation in Sandbox with purchased subscriptions. Bug report was sent.

Hi there,


Is there any word on this? It's been a week since the last response and this is real issue for our upcoming release.


Thanks,


Mike.

Hi zcodev,


I just used the following to validate your appStoreReceipt in a terminal window and it worked for me


curl -d '{ "receipt-data": "xxxx"}' https://sandbox.itunes.apple.com/verifyReceipt


Where xxxx is base64 encoded appStoreReceipt contents. It appears that the issue was fixed in the sandbox. Let me know if you find differently.


{

"receipt":{"receipt_type":"ProductionSandbox", "adam_id":0, "app_item_id":0, "bundle_id":"com.mappedmarketplace.xxxx", "application_version":"7729", "download_id":0, "version_external_identifier":0, "receipt_creation_date":"2019-11-27 08:01:18 Etc/GMT", "receipt_creation_date_ms":"1574841678000", "receipt_creation_date_pst":"2019-11-27 00:01:18 America/Los_Angeles", "request_date":"2019-12-04 20:02:20 Etc/GMT", "request_date_ms":"1575489740454", "request_date_pst":"2019-12-04 12:02:20 America/Los_Angeles", "original_purchase_date":"2013-08-01 07:00:00 Etc/GMT", "original_purchase_date_ms":"1375340400000", "original_purchase_date_pst":"2013-08-01 00:00:00 America/Los_Angeles", "original_application_version":"1.0",

"in_app":[

{"quantity":"1", "product_id":"com.horsemarketplace.basic.***", "transaction_id":"1000000555871494", "original_transaction_id":"1000000555871494", "purchase_date":"2019-08-08 15:42:46 Etc/GMT", "purchase_date_ms":"1565278966000", "purchase_date_pst":"2019-08-08 08:42:46 America/Los_Angeles", "original_purchase_date":"2019-08-08 15:42:46 Etc/GMT", "original_purchase_date_ms":"1565278966000", "original_purchase_date_pst":"2019-08-08 08:42:46 America/Los_Angeles", "is_trial_period":"false"},

{"quantity":"1", "product_id":"com.horsemarketplace.basic.***", "transaction_id":"1000000597978430", "original_transaction_id":"1000000597978430", "purchase_date":"2019-11-27 08:01:18 Etc/GMT", "purchase_date_ms":"1574841678000", "purchase_date_pst":"2019-11-27 00:01:18 America/Los_Angeles", "original_purchase_date":"2019-11-27 08:01:18 Etc/GMT", "original_purchase_date_ms":"1574841678000", "original_purchase_date_pst":"2019-11-27 00:01:18 America/Los_Angeles", "is_trial_period":"false"}]}, "status":0, "environment":"Sandbox"}


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Thanks Rich for the support.


We analysed the request from the web server.For consumable items,we were sending password parameter with empty string value to https://sandbox.itunes.apple.com/verifyReceipt end point.This request was working fine previously.


Now in order to make it work,we need to remove password parameter for consumable items to the https://sandbox.itunes.apple.com/verifyReceipt end point.


Hope this change will fix this issue for others also.