Subscription Status URL, no post object after IAP in sandbox?

Hello,


In iTune Connect, for MyApp after entring "Subscription Status URL" (letsencrypt ssl cert)


After in-app purchase of type Auto Renewal product, no post json object recived from apple/itune server.


as per documation at

statusUpdateNotification is a server-to-server notification service


https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html


Some post suggest that after hour it will start working, but after 48 hours, no response???

Replies

I'm not seeing any notifications come in even on prod.

It is spotty and the status updates don't match the numbers we are getting from iTunes connect, had it running for about a week. We are only really receiving updates if the event is an intial buy. Which doesn't really help us because hey I know when you bought something the client tells me.

mine got activate immediately after entering the url and sandbox works for me too. but few min delay after user subscription.

one thing I notice is I won't automatically get renewal callback. Will only get the renew callback once I try to validate and renew again on the phone.

you need use https protocol on your server to receive apple statusUpdateNotification. Check ATS established on your server with version TLS1.2

Hello!


Did you manage to get this work?


I am currently facing the exact same problem.


Regards

Have you gotten any renewal callbacks? We implemented the Subscription Status URL and we always get the initial transaction: INTERACTIVE_RENEWAL or INITIAL_BUY but never anything else.


Thoughts?

Same here. We always receive INTERACTIVE_RENEWAL and INITIAL_BUY. Occassionally got RENEWAL. But never got CANCEL and DID_CHANGE_RENEWAL_PREF.


Is this issue has been resolved in sandbox yet? Seems like no replies from the Apple team.

How do you guys test callback for subscription cancellation then?

I posted the following to <https://forums.developer.apple.com/thread/93749>


If you read the description of the RENEWAL event, you will note - "Automatic renewal was successful for an expired subscription. Check Subscription Expiration Date to determine the next renewal date and time." In general, iTunes will attempt to charge the user account a day before an auto-renewing subscription is scheduled to expire. If the renewal is successful, there is no server-to server notification because the auto-renewing subscription did not enter into an expired state. However, in the few cases that iTunes is unable to renew the subscription (generally there was a connection problem with the credit card server) and the auto-renewing subscription is not renewed before the expiration_date passes, the auto-renewing subscription is technically considered “expired”. However, iTunes will still continue to attempt to renew the subscription. It iTunes is successful, then the “RENEWAL” event is sent. for this reason, the advice is presented - “Check Subscription Expiration Date to determine the next renewal date and time.”


To verify whether the auto-renewing subscription In-App Purchase is current, validate the appStoreReceipt with the verifyReceipt server. Assuming that there is an auto-renewing subscription item in the in_app array, then review the latest_receipt_info records and find the subscription record which has an expires_date later than the current date, one without the cancellation_date field set.


As for the CANCEL notification, there is no support for this notification in the sandbox.


CANCEL - Subscription was canceled by Apple customer support. Check Cancellation Date to know the date and time when the subscription was canceled.

Clarification - the term cancel is the specific case where the user contact Apple Care, requests a refund for the auto-renewing subscription In-App Purchase, is granted the refund, and the auto-renewing subscription has the cancellation_date set. This event is not the same as when the user enters their iTunes account - Subscription section, and indicates that they choose not to allow an existing auto-renewing subscription to renew. There is no notification type for this event. I call this the “EXPIRE” event - there is no server-to-server notification when the user makes this choice.


The only way for an application to detect that the auto-renewing subscription has simply expired is for the app process to validate the appStoreReceipt and to find that there is no longer an iAP item showing the expires_date greater than todays date. The process should also check for the presence of the is_in_billing_retry_period field in the most recent entry to determine whether the App Store is attempting to renew the auto-renewing subscription.


DID_CHANGE_RENEWAL_PREFERENCE - Customer changed the plan that takes affect at the next subscription renewal. Current active plan is not affected.

Clarification - If your app offers multiple items in an auto-renewing subscription group, then if the user has purchased a higher level item and attempts to switch to a lower grade auto-renewing subscription item (this is considered an auto-renewing subscription downgrade), then this notification is sent to your process. The higher level auto-renewing subscription will continue until the expiration_date - at which time the downgrade auto-renewing subscription will be put into effect. - I would think that if the user downgraded the subscription type, this event should happen. It may be a bug report to be investigated by the iTunes Store server team.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Thanks for the clarifications. But I have a question. What notification will we get when an user UPGRADES? Upgrade case seem to be fit into none of the 5 notification types. So, please clary this.

For "DID_CHANGE_RENEWAL_PREFERENCE", why does this event not fire when the user cancels their subscription? According to the documentation, "Customer changed the plan that takes affect at the next subscription renewal. Current active plan is not affected."


The customer changed the plan, as in they no longer want to renew it. The name of the event is DID CHANGE RENEWAL PREFERENCE. The only way to interpret that in my opinion is that the user changed something about their renewal preferences, as in their preference is now to not renew (or from not renewing to renewing). Based on the description AND the event name, there was a change to the plan taking EFFECT (not affect.....) at the next subscription renewal, the change being I don't want to subscribe after this month is over.


Is there something I am not understanding? How can I receive this event when I cancel my subscription or reactivate it? I lost quite a bit of time because of my misunderstanding of the documentation. Please clarify.

I guess Apple decided that when someone completely cancels a subscription they are not 'changing' their renewal preference. I see your argument but you have to admit it's a bit stretched. The description is:

"Customer changed the plan that takes affect at the next subscription renewal. Current active plan is not affected."

Customer is 'changing the plan' but not the plan that "takes effect at the next subscription renewal" because there will be no "next subscription renewal". And, clearly, the "current active pan" is affected.


There is a Cancel notification documented here:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html

Thanks PBK. Guess my English is not as good as I thought. That and I was hoping that apple would send an event when a user cancels the subscription so we don't have to query receipts with a cron job that runs every so often. We will have to keep it around then.


Cheers!

Apple will send a CANCEL notifiction when the user cancels (which is different from - does agree to renew) the subscription.