Search code examples
iostestingin-app-purchaseapp-store-connectserver-to-server

App Store Connect Sandbox Server-to-Server Notifications Not Sending Expected Fields


I've setup server-to-server notifications for in app purchases for iOS. I'm receiving the http posts successfully, but the request.body does not include all the expected fields as described here.

The only fields I'm getting are latest_receipt or latest_expired_receipt, depending on the subscription status. When I decode those fields from base64 I'm getting the receipt, which is good, but I need to see other fields in the request such as notification_type, environment, etc. The notification_type is particularly important since I need to know if a subscription is expired or renewed. Am I not getting all the fields because the environment is Sandbox? Should I expect something different in Production?


Solution

  • We are using server to server notifications just like you and we have no issues on both sandbox&production environments. I just checked. We do receive latest_receipt or latest_expired_receipt and all other fields including notification_type.

    But notification_type and other fields are not inside latest receipt, they are in the same JSON level as latest receipt key.