We have an app that use renewable IAP subscriptions, which have worked great for a couple of years with no hiccups. Today however we got an email from one of our users saying that he had purchased a subscription, but didn't get it delivered. We have a backend system that keeps track of products delivered etc, by validating the receipts against Apple. However, we can't find any trace of this customers receipt in the backend system or in any of our logs.
The first conclusion is that the user is lying, however, he have forwarded the invoice-mail he claims he got from Apple, and it looks legit. How can I use the information in this email to do some kind of validation? The email contains (don't know if the translations are correct) "sequence number", "order id" & "document id", but none of these id's exists when we validate receipts on the backend. In the backend system we have an id called OriginalTransactionId, which we usually use to keep track of all payments from a specific subscription. Can I somehow connect the OrderId to an OriginalTransactionId? Or can I ask Apple to validate a specific OrderId?
Another thing that bugs me is that we in the app have a "restore purchases"-button, that also have worked fine for years when the customers have issues like these. This customer however says that the button isn't working. The error-message he get is only displayed from this method in the code:
- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error;
Unfortunately we don't use the NSError object in any way, so I don't know what the actual error is, since we only display a generic error to the user when this happens.
The documentation of restoreCompletedTransactionsFailedWithError doesn't say much about what can cause this method to be called. Do you guys know when and why it might happen?