Receiving duplicated notifications on server-to-serve notification

I've noticed that the server we've created to handle the notifications received from apple serve-to-server notifications have been sent in a couple of days at time.

Exemple: Apple sent a notification INITIAL_BUY type at 01/28/2022. At 01/29/2022, apple sent another two INITIAL_BUY notifications, with the same originalTransactionId and trasactionId. As the server is not expecting to receive another INITIAL_BUY, it has been returning 5xx for Apple. For this same consumer, I've received another five notifications with INITIAL_BUY, all of them with the same trasactionId. Futhermore, I've received another notifications that were repeated and with the previous transactionId from the INITIAL_BUY...

Please refer to https://developer.apple.com/documentation/appstoreservernotifications/responding_to_app_store_server_notifications for information about our retry strategy. If we detect a failure on the first attempt, we will retry several times, or until a successful response is received. Only return a 4xx or 5xx response if you wish for the notification to be retried.

If you are using V2 notifications, you can also examine the notificationUUID field to detect duplicates. https://developer.apple.com/documentation/appstoreservernotifications/responsebodyv2decodedpayload

Receiving duplicated notifications on server-to-serve notification
 
 
Q