Search code examples
iphonedatabasecocoa-touchios4in-app-purchase

what's the likely max length of apple ios purchase receipt-data?


Before beginning to test the iOS autorenewing purchases I need to prepare my server database. My question is simple. I just wanna know what size I should make the varchar field in my database.


Solution

  • I was using a varchar (4096) to store my base64 encoded receipts.

    But to be honest, I couldn't find anything regarding receipt length on the official documentation (or anywhere else). The only thing I did find on Apple's docs was that the receipt content/format is subject to change:

    The contents and format of the store receipt is private and subject to change. Your application should not attempt to parse the receipt data directly. Use the mechanism described here to validate the receipt and retrieve the information stored inside it.

    So probably going for text instead of varchar really is the best option.