When I test an in-app purchase with the sandbox the post request to the sandbox url https://sandbox.itunes.apple.com/verifyReceipt returns
data: { environment: 'Sandbox', status: 21003 }
The 21003 status code means that the receipt could not be authenticated. https://developer.apple.com/documentation/appstorereceipts/status?language=objc
Is this expected? I'd assumed my test receipt would be considered valid for the sandbox environment and return a status of 0.
No its not expected. I needed to provide a valid code in the password field even though the in-app purchase was not for an auto-renewable subscription.