Search code examples
app-storewebhooksserver-to-server

What is retry policy for Apple Server-to-Server Notifications


I'm implementing server-side application that manages subscriptions for IOS application. To control account state(subscription is active or not) on the backend I'm using Apple Server-to-Server Notifications

Documentation saying:

Respond to Server-to-Server Notifications Your server should send an HTTP status code to indicate whether the server-to-server notification post succeeded:

Send HTTP 200 if the post was successful. Your server is not required to return a data value.

Send HTTP 50x or 40x to have the App Store retry the notification if the post was not successful. The App Store makes several attempts to retry the notification over a period of time but eventually stops after continued failed attempts.

But it is not clear which exactly retry policy apple following in case of server error on my side. I'm looking for the answer to the following questions

  1. How many retries apple will do?
  2. With which interval between retries?

Solution

  • Refer: https://developer.apple.com/documentation/appstoreservernotifications/your_server

    Upon receiving a server notification, respond to the App Store with an HTTP status code of 200 if the post was successful. If the post was unsuccessful, send HTTP 50x or 40x to have the App Store retry the notification.

    If the App Store server doesn’t receive a 200 response from your server after the initial notification attempt, it retries three times. App Store retries at 6, 24, and 48 hours after its initial attempt. While App Store server notifications report state changes in real-time, you can always initiate receipt validation to get an up-to-date receipt. For more information