4

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?
Kazunori Takaishi
  • 2,268
  • 1
  • 15
  • 27
Peter Gyschuk
  • 919
  • 8
  • 12

4 Answers4

3

The retry policy for App Store server notifications depends on the version of the server notification. It retries as follows:

  • For version 1 notifications, it retries three times; at 6, 24, and 48 hours after the previous attempt.
  • For version 2 notifications, it retries five times; at 1, 12, 24, 48, and 72 hours after the previous attempt.

See here for details.

Kazunori Takaishi
  • 2,268
  • 1
  • 15
  • 27
1

As you said Apple does not provide a clear answer in the documentation. But, from the Apple WWDC 2019 conference video: https://developer.apple.com/videos/play/wwdc2019/302/?time=637

"However, should you not return a 200 response, we will retry up to three times to resend the notification to you"

Some manual testing suggests that they retry message for one hour.

Gastly Yoi
  • 73
  • 1
  • 8
1

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

ngocnd0242
  • 26
  • 2
0

Apple will attempt to retry 3 times over 3 days.

Hitch22
  • 365
  • 1
  • 9