Mac App Store consumable receipts have empty in_app hash on server side validation
Does this mean the receipts are invalid?
No, the status
value is 0
, which according to the docs means that the receipt is valid. It just doesn't contain any in-app purchase “sub-receipts”.
Should the in_app field always be populated?
No, it's possible for a receipt to not contain any in-app purchases.
So apparently your problem is that for some reason the receipt your app is sending to your backend doesn't contain information for an in-app purchase, even though you expect it to.
When an in-app purchase transaction enters the "purchased" state, the receipt should be up to date on the client device — you should ensure that you don't try to send the receipt onto your server before this happens.
One other thing to consider trying is SKReceiptRefreshRequest
(only available since 10.9, though) — in some edge conditions the receipt might not be up to date, and you'd need to wait for it to update before sending the receipt redemption request to your backend.