Search code examples
iosobjective-creceipt-validation

What to do with transactionReceipt deprecation for IAP?


I am currently validating transaction.transactionReceipt base64encoded as a string server side. The problem is that transaction.transactionReceipt is deprecated now and I don't know what to replace this with for in app purchases.

The new documentation suggests using NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; , but the docs say that it is only for app purchase validation and not for in app purchases.

What do I do in this case?


Solution

  • As can be read in other parts of the documentation the receipt does contain the data for IAP as well. I've also verified this from my own experience, as this is the way we did it where I worked. Basically the only change is that instead of having a receipt for each IAP there is a single one for both the app and all IAPs.

    My guess however is that the URL remains the same, although I haven't verified it, but the data contained at the URL changes.