title: Apple: In App Purchase Subscriptions & Server to Server Notifications
body: <p>I'm having some trouble figuring out Apple's Server-To-Server Status Updates for In App Purchases:</p>
  
  <p>For example– they say they provide these notifications:</p>
  
  <pre><code>CANCEL
  
  DID_CHANGE_RENEWAL_PREF
  
  DID_CHANGE_RENEWAL_STATUS
  
  DID_FAIL_TO_RENEW
  
  DID_RECOVER
  
  INITIAL_BUY
  
  INTERACTIVE_RENEWAL
  
  RENEWAL
  </code></pre>
  
  <p>But for some reason, they do not provide the applicable transaction, but instead provide "the last 100 receipts". Here's the documentation– they also appear to be <a href="https://developer.apple.com/documentation/appstoreservernotifications/responsebody" rel="nofollow noreferrer">deprecating the field</a> that previously provided the single relevant object. </p>
  
  <p><code>latest_receipt_info array</code></p>
  
  <blockquote>
    <p>An array that contains the latest 100 in-app
    purchase transactions of the decoded value in latest_receipt. This
    array excludes transactions for consumable products that your app has
    marked as finished. The contents of this array are identical to those
    in responseBody.Latest_receipt_info in the verifyReceipt endpoint
    response for receipt validation.</p>
  </blockquote>
  
  <p>If I receive a notification with a status– how can I correlate which of the last 100 receipts the notification is relevant to?</p>