title: iOS IAP receipt validation error handling
body: <p>I have a bunch of IAPs in my iOS application, and I have implemented receipt validation for the IAPs.</p>
  
  <p>I'm wondering what error handling I should be doing if the receipt validation request fails.</p>
  
  <p>So, say you have a user who legitimately purchases one of the IAPs, the transaction was successful but the request to verify the receipt fails for whatever reason (e.g. no connection, Apple's server is down). I assume that the user will have been charged because the transaction was successful, but as the validation failed the user will not have been given the content.</p>
  
  <p>What should I do in this situation? I know it might be a rare case but I want to account for it anyway.</p>
  
  <p>I was thinking I could save the receipt to persistent storage and retry the receipt validation in the background until it succeeds. Is this a viable option? Do the receipts remain valid forever or do they expire after a certain amount of time?</p>
  
  <p>I couldn't find much information on this from Apple's documentation so I'm asking you guys.</p>
  
  <p>Thanks in advance</p>