No subscription notification in sandbox

Anyone know why no subscription notification in sandbox?

But refer document, there are status update notifications in the test environment.


Status Update Notifications in the Test Environment

It is recommended that you test

statusUpdateNotifications
for transactions in the test environment before implementing this logic in production.

To determine if a status update notifications for a subscription event is in the test environment, check if the value of the

environment
key in the
statusUpdateNotification
JSON object equals
SANDBOX
.

Replies

Or anyone can offer the raw notification body example when notification_type is "RENEWAL" and "INTERACTIVE_RENEWAL"?

The basic body is the same for all events, except when the event is a cancel event. This is what it looks like for a renewal event.

"params": {
     "format": "json",
     "auto_renew_status": "true",
     "latest_receipt_info": {
          "expires_date_formatted": "2017-08-25 19:03:49 Etc/GMT",
          "expires_date": "1503687829000",
          "bid": "BUNDLE IDENTIFIER",
          "product_id": "PRODUCT ID",
          "original_transaction_id": "***",
          "unique_identifier": "***",
          "expires_date_formatted_pst": "2017-08-25 12:03:49 America/Los_Angeles",
          "original_purchase_date_pst": "2017-07-17 17:22:22 America/Los_Angeles",
          "version_external_identifier": "822571691", "item_id": "1112643772",
          "original_purchase_date": "2017-07-18 00:22:22 Etc/GMT",
          "unique_vendor_identifier": "####",
          "app_item_id": "#####",
          "original_purchase_date_ms": "1500337342000",
          "bvrs": "112",
          "purchase_date": "2017-07-25 19:03:49 Etc/GMT",
          "web_order_line_item_id": "70000068664015",
          "purchase_date_ms": "1501009429000",
          "purchase_date_pst": "2017-07-25 12:03:49 America/Los_Angeles",
          "transaction_id": "70000345450056",
          "quantity": "1"
          },
     "latest_receipt": "*******",
     "apple_subscription_status_update": {},
     "environment": "PROD",
     "auto_renew_product_id": "PRODUCT",
     "notification_type": "RENEWAL",
     "password": "*******"
     }

Thanks for this @steladev.


Is anyone else able to get notifications sent your server while still in Sandbox? I've tried two different servers (heroku and google cloud both SSL) and neither seem to ever get a notification sent.


Thanks!

Working fine for me today using sandbox. I am hosting on Azure.


One thing I am not sure is if the notification already have the expiration date why do we need to call and validate the receipt again according to the document.

Good point, I guess just in case the notification doesn't actually come through.


I'll wait a bit longer to see if maybe the notifications show up. My app isn't live, still in final dev, but Sandbox should work. Everything else about notifications seems too.


I appreciate the feedback, thanks for taking the time.

Hi,

Have your server received the notification from Apple in Sandbox? and how to fix it ? I've meet the same situation , no notification:(


Thank you

There are 2 issue reported here -

1.. implementing server to server notifications and not receiving any notifications and

2. why should one implement both receipt validation as well as server to server notification.


For issue 1, this is a bug report to be submitted for investigation.

Please use the Apple Developer Bug Report web page to submit the problem report as follows.

1. Go to the web site http://bugreport.apple.com

2. Select the Product iTunesConnect

3. In the problem description please make sure to include the

applicationID

the In-App Purchase identifiers for the auto-renewing subscription items

the instructions for finding the In-App Purchase items in the app. (If the app is not in English, please provide a series of screenshots to use to help the QA engineer navigate to the purchase page)

the server address defined in iTunesConnect to receive the notifications

Indicate that you are preparing a TestFlight build and will send a TestFlight invitation.


Save the bug report and keep track of the bug report number

Prepare a TestFlight build - when ready submit an invitation to “apps_test@icloud.com”. In the invitation, please include the bug report number to associate the invitation with.


For issue 2.

You'll note that the server to server notification have no direct identification to associate then with a specific customer. Typically, you will save the appStoreReipt with some user generated ID. In order to match the server to server notification, the recomendation is to use the "web_order_line_item_id" field - to make sure you are matching the correct appStoreReceipt to the server notification. You might use the original_transaction_id value to make a preliminary match of the contents of a stored appStoreReceipt to the server notification, as in the case of a cancellation. In such case, the server can re-validate the appStoreReceipt to verify that the active subscription item with the matching "web_order_line_item_id" field in the in_app array, now has the cancellation_date field set.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Hi, Thank you for your advice, I've reported the bug(34161337) and also submitted an invitation to apps_test@icloud.com, but almost a week passed, no one responsed the bug and no one installed the testflight build. so , what can I do next to solve this problem? Thank you.


Best regards

Hi, Did you manage to get notification from apple's server?
Can you answer me for the following question, please?
Are the notifications for the status updates sent automatically by Apple? I mean if I manage to purchase an item in my app, then will they send a notification automatically to my server (or do I have further tasks to implement in my app, before Apple starts to send the notifications)?


Thank you

Hello!


Did you manage to get this work?


I am currently facing the exact same problem.


Regards

I am currently facing the exact same problem.


Bug reported : 45139272

Here is for INTERACTIVE_RENEWAL. Some fields' values are edit.


{
    "auto_renew_product_id": "com.yourdomain.subdomain.productid",
    "auto_renew_status": "true",
    "environment": "Sandbox",
    "latest_receipt": "...",
    "latest_receipt_info": {
        "bid": "com.yourdomain.subdomain",
        "bvrs": "24",
        "expires_date": "1541077870000",
        "expires_date_formatted": "2018-11-01 13:11:10 Etc/GMT",
        "expires_date_formatted_pst": "2018-11-01 06:11:10 America/Los_Angeles",
        "is_in_intro_offer_period": "false",
        "is_trial_period": "false",
        "item_id": "1438111581",
        "original_purchase_date": "2018-11-01 12:42:03 Etc/GMT",
        "original_purchase_date_ms": "1541076123000",
        "original_purchase_date_pst": "2018-11-01 05:42:03 America/Los_Angeles",
        "original_transaction_id": "1000000466237777",
        "product_id": "com.yourdomain.subdomain.productid",
        "purchase_date": "2018-11-01 13:08:10 Etc/GMT",
        "purchase_date_ms": "1541077690000",
        "purchase_date_pst": "2018-11-01 06:08:10 America/Los_Angeles",
        "quantity": "1",
        "transaction_id": "1000000466666666",
        "unique_identifier": "442b762057a137980490726325add38aaaaaaaaa",
        "unique_vendor_identifier": "QQQQQQQQ-AAAA-BBBB-QQQQ-AAAAAAAAAAAA",
        "version_external_identifier": "0",
        "web_order_line_item_id": "1777777722222222"
    },
    "notification_type": "INTERACTIVE_RENEWAL",
    "password": "..."
}