Search code examples
apple-push-notificationssubscription

Missing params from body when sandbox environment


We are implementing push server notifications and during our tests we are getting way too few parameters in json from apple which makes it impossible to identify the subscription.

Table 6.3 in their documentation claims that body contains several params amongst original_transaction_id, latest_receipt, latest_receipt_info etc.

Though, we are only getting for INTERACTIVE_RENEWAL type:

{
"auto_renew_product_id": "agreement_chat_MO_auto_renewal",
"password": "CORRECT_PASSWORD_HERE",
"environment": "Sandbox",
"auto_renew_status": "false",
"notification_type": "INTERACTIVE_RENEWAL"
}

and for DID_CHANGE_RENEWAL_STATUS type:

{
"auto_renew_status_change_date": "2019-06-03 08:13:11 Etc/GMT",
"environment": "Sandbox",
"auto_renew_status": "false",
"auto_renew_status_change_date_pst": "2019-06-03 01:13:11 America/Los_Angeles",
"password": "CORRECT_PASSWORD_HERE",
"auto_renew_status_change_date_ms": "1559549591000",
"auto_renew_product_id": "the_product_id",
"notification_type": "DID_CHANGE_RENEWAL_STATUS"
}

Given those params, it is impossible to find the subscription the notification refers at.

Am I missing something here? Is the sandbox broken in any way?


Solution

  • You are not the only one... https://forums.developer.apple.com/thread/116996

    It has been broken in Sandbox for days now. We checked our logs and they had this error in production for some time. Now in production it seems to be fixed, but the problem persists in Sandbox.