Sandbox verifyReceipt always returning 21004 status

We have an app in development that has auto-renewable subscription products. When a purchase is made on TestFlight, it goes through StoreKit successfully and our app gets the receipt data. However, when we send this receipt to our back-end for validation against Apple's API, we consistently get the following response, indicating that the shared secret is invalid:


{
  "status": 21004,
  "environment": "Sandbox"
}


We've triple-checked that the shared secret we send in the password field of the request to https://sandbox.itunes.apple.com/verifyReceipt exactly matches the one in App Store Connect. In fact, this process was working just fine a few weeks ago when we first set up the payments system in our app. Then, without changing anything on our end, we starting running into this issue.


I filed a ticket in Feedback Asssistant last week, based on advice for similar issues that were reported here on the forums, but have not heard back from Apple.


Similar issue on the forums: https://forums.developer.apple.com/thread/72991


Is anyone else running into this issue?

Replies

me
If you have a reproducible case, please file a ticket and include all relevant information such as console logs, sysdiagnose, base64 encoded receipt, sandbox Apple ID used and screen recordings if applicable. https://feedbackassistant.apple.com
And ensure the password is being supplied with the request when use the verifyReceipt validation service. More info available here: https://developer.apple.com/documentation/appstorereceipts/requestbody